L = set(map(int, input().split())) N = set(range(1, 11)) print(*(N-L))