n, x = map(int, input().split()) listt = list(map(int, input().split())) listt.append(x) listt.sort() for i in listt: print(i, end=" ")