# Tricky Sorting

Execution time limit is 1 second

Runtime memory usage limit is 128 megabytes

The sequence of numbers is given. Arrange them in non-decreasing order of the last digit, and in the case of equality of last digits — arrange the numbers in non-decreasing order.

## Input

The first line contains number $n(1≤n≤100)$, and next lines contain the positive integers not greater than $32000$.

## Output

Print the sequence of numbers ordered as given in problem statement.

## Examples

Input #1

Answer #1

Input #2

Answer #2

Submissions 14K

Acceptance rate 55%