n,m = map(int,input().split(" ")) s = list(map(int,input().split(" "))) s = sorted(s, reverse = False) for i in s: print(i, end=" ")