input: 2 1000 3 10 1 5 17 33 8 12 sorted: 1 2 3 5 8 10 12 17 33 1000