Given an array of N integers, you need to print the array after each pass of radix sort. In each pass, you need to sort the array by digits starting from least significant digit to most significant digit.
Input:
The first line consists of an integer N denoting the size of array.
The next line consists of N space separated integers.
Output:
Print the array after each pass. See the output for clarity.
Constraints:
1≤N≤1000
0≤A[i]≤109
Each line of the output is the array after each pass.