n = list(map(int, input().split())) m = [1, 1, 2, 2, 2, 8] print(*list(m[i]-n[i] for i in range(6)))