Minimums to the left#8963

Minimums to the left

1 second
128 megabytes
Very easy

Given an array of integers. Move all minimum elements to the beginning of the array without changing the order of others.

Input

The first line contains positive integer (n \leq 100). Next line contains integers. All numbers do not exceed by absolute value.

Output

Print the elements of updated array.

prb8963.gif

Examples

Example 1

Loading
Loading