def f(n):return 0 if n<2 else n+f(n/2)+f(n-n/2)
n=f(input())
print " ".join(sorted(raw_input().split(),key=int))
print n def f(n):return 0 if n<2 else n+f(n/2)+f(n-n/2) f n n n=f(input()) n f(input()) f input() input print " ".join(sorted(raw_input().split(),key=int)) " ".join " " join sorted(raw_input().split(),key=int) sorted raw_input().split() ().split () raw_input split key=int key int print def f(n):return 0 if n<2 else n+f(n/2)+f(n-n/2) def f(n):return 0 if n<2 else n+f(n/2)+f(n-n/2) f n=f(input()) f(input()) n
def f(n):return 0 if n<2 else n+f(n/2)+f(n-n/2)
n=f(input())
print " ".join(sorted(raw_input().split(),key=int))
print n