Sort an entire unsorted array

Input Format
There will be two lines of input:
s - the size of the array
ar - the list of numbers that makes up the array
Output Format
On each line, output the entire array at every iteration

Sample Input
6
1 4 3 5 6 2
Sample Output

1 4 3 5 6 2 
1 3 4 5 6 2 
1 3 4 5 6 2 
1 3 4 5 6 2 
1 2 3 4 5 6