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

a = P + Q
b = Q + R
c = P + R
l = [a, b, c]
print(min(l)) P, Q, R = map(int, input().split()) P map(int, input().split()) map int input().split() ().split () input split Q R a = P + Q a P + Q P Q b = Q + R b Q + R Q R c = P + R c P + R P R l = [a, b, c] l [a, b, c] a b c print(min(l)) print min(l) min l l = [a, b, c] [a, b, c] l b = Q + R Q + R b R = map(int, input().split()) map(int, input().split()) R P, Q, R = map(int, input().split()) map(int, input().split()) P a = P + Q P + Q a Q, R = map(int, input().split()) map(int, input().split()) Q c = P + R P + R c
P, Q, R = map(int, input().split())

a = P + Q
b = Q + R
c = P + R
l = [a, b, c]
print(min(l))
