import sequtils,strutils,algorithm,math,sugar,macros,strformat template get*():string = stdin.readLine().strip() let n = get().parseInt() var A = get().split().map(parseInt) for i in 1..<(2*n-3): for p in 0.. p :: 2p < i # if q <= p : break if q < n: if A[p] > A[q] : swap(A[p],A[q]) echo A.join(" ")