p, q, r = sorted([int(n) for n in input().split()])
print(p + q) int(n) for n in input().split() for n in input().split() n input().split() ().split () input split for n in input().split() int(n) int n p, q, r = sorted([int(n) for n in input().split()]) p sorted([int(n) for n in input().split()]) sorted [int(n) for n in input().split()] q r print(p + q) print p + q p q r = sorted([int(n) for n in input().split()]) sorted([int(n) for n in input().split()]) r q, r = sorted([int(n) for n in input().split()]) sorted([int(n) for n in input().split()]) q p, q, r = sorted([int(n) for n in input().split()]) sorted([int(n) for n in input().split()]) p
p, q, r = sorted([int(n) for n in input().split()])
print(p + q)