全探索Aを全部舐めて、偶数だけ拾っていくN = int(input()) A_L = list(map(int, input().split())) ans_L = [] for a in A_L: if a % 2 == 0: ans_L.append(a) print(*ans_L)