import sys
input = sys.stdin.readline
arr = [0 for _ in range(30)]

for i in range(28):
    arr[int(input()) - 1] = 1

for i in range(30):
    if arr[i] == 0:
        print(i + 1)
b3d073849568bf5d2cac29d80ac67fd7082417f7
<mask token>

<mask token>
for i in range(28):
    arr[int(input()) - 1] = 1
for i in range(30):
    if arr[i] == 0:
        print(i + 1)

<mask token>
input = sys.stdin.readline
arr = [(0) for _ in range(30)]
for i in range(28):
    arr[int(input()) - 1] = 1
for i in range(30):
    if arr[i] == 0:
        print(i + 1)

import sys
input = sys.stdin.readline
arr = [(0) for _ in range(30)]
for i in range(28):
    arr[int(input()) - 1] = 1
for i in range(30):
    if arr[i] == 0:
        print(i + 1)

import sys
input = sys.stdin.readline
arr = [0 for _ in range(30)]

for i in range(28):
    arr[int(input()) - 1] = 1

for i in range(30):
    if arr[i] == 0:
        print(i + 1)