import random N, M = map(int, input().split()) A = list(map(int, input().split())) random.shuffle(A) print(" ".join(map(str, A)))