P, Q, R = list(map(int, input().split()))

print((sum([P, Q, R]) - max([P, Q, R])))
P, Q, R = list(map(int, input().split()))

print(((P + Q + R) - max(P, Q, R)))
P, Q, R = list(map(int, input().split()))
print((sum([P, Q, R]) - max([P, Q, R])))

P, Q, R = list(map(int, input().split()))
print(((P + Q + R) - max(P, Q, R)))

-print((sum([P, Q, R]) - max([P, Q, R]))) +print(((P + Q + R) - max(P, Q, R)))