<gh_stars>1-10
# https://www.codechef.com/CCSTART2/problems/SECLAR

a = []
for z in range(3): a.append(int(input()))
print(sorted(a)[1])
# https://www.codechef.com/CCSTART2/problems/SECLAR

a = []
for z in range(3): a.append(int(input()))
print(sorted(a)[1])
# https://www.codechef.com/CCSTART2/problems/SECLAR