Infocomm club members visit Koi frequently after CCA meetings.
Koi is a popular bubble tea outlet which sells tea with pearls (or bubbles).
One day, while enjoying Koi, Kenneth Chow decided to sort the bubbles in his mouth by their diameter.
However, since it is hard to think when there's something inside your mouth. He asked you for help. Being a C++ freak, you wanted to code a program to do Bubble Sort.
The first line of input is n
, which is the number of bubbles Kenneth has in his mouth.
Kenneth has a big mouth, which can hold up to 2000 bubbles.
The next line consists of n
space separated numbers, representing the diameter of the bubbles in Kenneth's mouth.
Sort the list of diameters and print them out in ascending order, space-separated.
5 8 2 3 7 4 9 7 1 2
1 2 2 3 4 5 7 7 8 9
*There is no extra space behind the last number of the output*