a = set(map(int, input().split())) print(*set(range(1, 10 + 1)) - a)