B = list(map(int,input().split())) ls = set([i+1 for i in range(10)]) for i in range(9): ls.remove(B[i]) print(*ls)