Bubble Sort 1#8237

Bubble Sort 1

0.3 seconds
64 megabytes
Very easy

Given an array consisting of natural numbers, your task is to sort it using the bubble sort algorithm and display the array after each iteration of the sorting process.

Input

The first line contains a single integer (1 \leq n \leq 100), representing the size of the array. The second line contains natural numbers, which are the elements of array (1 \leq A_i \leq 10^9).

Output

Provide n - 1 lines of output, each containing numbers, representing the state of the array after each iteration of the sorting process.

Examples

Example 1

Loading
Loading