xx = [int(input()) for i in range(3)]
[print(xx[i],end=" ") for i in range(len(xx)) if xx[i] & 1 == 0]
xx = [int(input()) for i in range(3)]
[print(xx[i],end=" ") for i in range(len(xx)) if xx[i] & 1 == 0]