New = [int(input()) for i in range(5)]
for i in range(len(New)):
if New[i] % 2 == 0:
New[i] = 1
print(New)
New = [int(input()) for i in range(5)]
for i in range(len(New)):
if New[i] % 2 == 0:
New[i] = 1
print(New)