Go: package main

import (
	"fmt"
	"sort"
)

func calcScore(n, m []int) (int, int) {
	sort.Ints(n)
	sort.Ints(m)
	
	return n[9] + n[8] + n[7], m[9] + m[8] + m[7]
}

func main(){
	var team_W, team_K []int
	var inp int
	
		for i := 0; i < 10; i++ {		
			fmt.Scan(&inp)
			team_W = append(team_W, inp)
		}

		for j := 0;  j< 10; j++ {		
			fmt.Scan(&inp)
			team_K = append(team_K, inp)
		}

	fmt.Println(calcScore(team_W, team_K))
}

Python: list_w = []
list_k = []

for i in range(10) :
    list_w.append(int(input()))
for i in range(10) :
    list_k.append(int(input()))

list_w.sort(reverse = True)
list_k.sort(reverse = True)

sumw = sum(list_w[0:3])
sumk = sum(list_k[0:3])

print(sumw, sumk)

Python: W = []
for w in range(10):
    w = int(input())
    W.append(w)
K = []
for k in range(10):
    k = int(input())
    K.append(k)
W.sort()
K.sort()
a1 = W[7] + W[8] + W[9]
a2 = K[7] + K[8] + K[9]
print(a1,a2)

Python: W=[int(input()) for i in range(0,10)]
K=[int(input()) for i in range(11,21)]

w=sorted(W, reverse=True)
k=sorted(K, reverse=True)
print(sum(w[0:3]),sum(k[0:3]))

Python: w=[]
k=[]

for i in range(10):
    w.append(int(input()))
for i in range(10):
    k.append(int(input()))

w.sort()
k.sort()

print(sum(w[7:]),sum(k[7:]))

Python: x = []
y = []
for i in range(10):
    n = int(input())
    x.append(n)
    x = sorted(x)
p=x[7:10]
for i in range(10):
    n = int(input())
    y.append(n)
    y = sorted(y)
q=y[7:10]
print(sum(p),sum(q))

Python: a = []
b = []

for i in range(10):
  a.append(int(input()))
  a.sort()
W = sum(a[7:])

for j in range(10,20):
  b.append(int(input()))
  b.sort()
K = sum(b[7:])

print(f'{W} {K}')

Python: # coding: utf-8
# Your code here!
n1=int(input())
n2=int(input())
n3=int(input())
n4=int(input())
n5=int(input())
n6=int(input())
n7=int(input())
n8=int(input())
n9=int(input())
n10=int(input())
n11=int(input())
n12=int(input())
n13=int(input())
n14=int(input())
n15=int(input())
n16=int(input())
n17=int(input())
n18=int(input())
n19=int(input())
n20=int(input())

n1,n2,n3,n4,n5,n6,n7,n8,n9,n10=sorted([n1,n2,n3,n4,n5,n6,n7,n8,n9,n10])
n11,n12,n13,n14,n15,n16,n17,n18,n19,n20=sorted([n11,n12,n13,n14,n15,n16,n17,n18,n19,n20])

print(n8+n9+n10,n18+n19+n20)

Python: W = []
K = []

for i in range(10):
    W.append(int(input()))

for i in range(10):
    K.append(int(input()))

W.sort(reverse=True)
K.sort(reverse=True)

print(W[0] + W[1] + W[2] , K[0] + K[1] + K[2])

Python: w1=[]
k1=[]
for i in range(10):
    A=int(input())
    w1.append(A)
w=sorted(w1,reverse=True)
W=w[0]+w[1]+w[2]
for j in range(10):
    B=int(input())
    k1.append(B)
k=sorted(k1,reverse=True)
K=k[0]+k[1]+k[2]

print(W,K)

Python: x=[int(input()) for i in range(20)]

a=x[0:10]
b=sorted(a)
del b[0:7]

c=x[10:]
d=sorted(c)
del d[0:7]

print(sum(b),sum(d))

Python: a=[int(input()) for i in range(20)]
A=[a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]]
x=sorted(A)
B=[a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19]]
y=sorted(B)
print(x[7]+x[8]+x[9],y[7]+y[8]+y[9])

Python: #(45)コンテスト
a=[]
for i in range(10):
    n=int(input())
    a.append(n)
a.sort(reverse=True)
b=[]
for j in range(10):
    m=int(input())
    b.append(m)
b.sort(reverse=True)
w=0
K=0
for k in range(3):
    w+=a[k]
    K+=b[k]
print(w,K)

Python: W=[]
K=[]
for i in range(10):
    s=int(input())
    W.append(s)
for j in range(10):
    t=int(input())
    K.append(t)
W=sorted(W)
K=sorted(K)
print(f'{sum(W[7:10])} {sum(K[7:10])}')

Python: w=[]
k=[]
for i in range(10):
    w.append(int(input()))
    w.sort()
W=sum(w[7:])
for j in range(10):
    k.append(int(input()))
    k.sort()
K=sum(k[7:])
print(f'{W} {K}')

Python: def main():
    a = []
    b = []
    for _ in range(10):
        a.append(int(input()))
    for _ in range(10):
        b.append(int(input()))
    a.sort(reverse = True)
    b.sort(reverse = True)

    aa = 0
    bb = 0
    for x in range(3):
        aa += a[x]
        bb += b[x]

    print(aa, bb)

if __name__ == "__main__":
    main()

Python: W=[]
K=[]
i=0
while i<10:
    s=int(input())
    W.append(s)
    i+=1
W.sort()
while 10<=i and i<20:
    s=int(input())
    K.append(s)
    i+=1
K.sort()
sum1=0
sum2=0
for i in range(7,10):
    sum1+=W[i]
for i in range(7,10):
    sum2+=K[i]
print(f'{sum1} {sum2}')

Python: arr1 = []
arr2 = []
for i in range(10):
    arr1.append(int(input()))
for i in range(10):
    arr2.append(int(input()))
arr1.sort()
arr2.sort()

print(str(arr1[9] + arr1[8] + arr1[7]) + " " + str(arr2[9] + arr2[8] + arr2[7]))

Python: W = []
K = []

for i in range(10):
    W.append(int(input()))

for i in range(10):
    K.append(int(input()))

W.sort(reverse=True)
K.sort(reverse=True)

print(W[0] + W[1] + W[2])
print(K[0] + K[1] + K[2])

Python: W = [int(input()) for _ in range(10)]
K = [int(input()) for _ in range(10)]
W.sort()
K.sort()

sumW = sum(W[-3:])
sumK = sum(K[-3:])
print(sumW, sumK)

Python: a = []
for i in range(10):
    n = int(input())
    a.append(n)
    a.sort(reverse=True)

b = []
for i in range(10):
    m = int(input())
    b.append(m)
    b.sort(reverse=True)
    
print('{} {}'.format(a[0]+a[1]+a[2],b[0]+b[1]+b[2]))

Python: w=[]
k=[]
for i in range(10):
  w.append(int(input()))
w.sort()

for i in range(10):
  k.append(int(input()))
k.sort()

print(sum(w[7:10]),sum(k[7:10]))

Python: # AOJ 0533: Contest
# Python3 2018.6.30 bal4u

s = [0]*2
for i in range(2):
	s[i] = sum(sorted([int(input()) for j in range(10)], reverse=True)[:3])
print(s[0], s[1])

Python: W = []
K = []
SW=0
SK = 0
for i in range(10):
    w = int(input())
    W.append(w)
    W.sort(reverse=True)
for i in range(10):
    k = int(input())
    K.append(k)
    K.sort(reverse=True)
for i in range(3):
    SW = SW + W[i]
for i in range(3):
    SK = SK + K[i] 
print(SW,SK)

Python: a,b = [],[]

for i in range(10):
    a.append(int(input()))
    
for i in range(10):
    b.append(int(input()))
    
a.sort(reverse=True)
b.sort(reverse=True)

print(a[0]+a[1]+a[2],b[0]+b[1]+b[2])

Python: W = []
K = []

for i in range(20):
    W.append(int(input()))

for i in range(20):
    K.append(int(input()))

W.sort(reverse=True)
K.sort(reverse=True)

print(W[0] + W[1] + W[2])
print(K[0] + K[1] + K[2])

Python: # coding: utf-8
# Your code here!

a = []
b = []
for i in range(0,10):
    n = int(input())
    a.append(n)
    a.sort()
    W = a[7:10]
for i in range(10,20):
    n = int(input())
    b.append(n)
    b.sort()
    K = b[7:10]
print(sum(W),sum(K))

Python: from collections import deque
wuniversity = deque([])
for i in range(20):
    wuniversity.append(int(input()))
 
kuniversity = deque([])
for i in range(10):
    kuniversity.append(wuniversity.pop())
 
kuniversity = sorted(kuniversity)
wuniversity = sorted(wuniversity)
 
print(wuniversity[-1]+wuniversity[-2]+wuniversity[-3], end=' ')
print(kuniversity[-1]+kuniversity[-2]+kuniversity[-3])

Python: W = [ int(input()) for i in range(10)]
K = [ int(input()) for i in range(10)]

W.sort()
K.sort()

print(W[7]+W[8]+W[9],K[7]+K[8]+K[9])

Python: print(*(sum(sorted([int(input()) for _ in range(10)])[-3:]) for _ in range(2)))

Python: # coding: utf-8
# 45

W = [int(input()) for i in range(10)]
K = [int(input()) for i in range(10)]

W.sort()
K.sort()
#print(W)
#print(K)
print(W[7]+W[8]+W[9],K[7]+K[8]+K[9])

Python: a=[]
b=[]
for i in range(10):
    n=int(input())
    a.append(n)
for i in range (10,20):
    n=int(input())
    b.append(n)
a.sort()
b.sort()
print(a[7]+a[8]+a[9],b[7]+b[8]+b[9])

Python: # coding: utf-8
# Your code here!

W = []
K = []
for i in range(10):
   W.append(int(input()))
   W.sort()
   W.reverse()
for i in range(10):
   K.append(int(input()))
   K.sort()
   K.reverse()

print(sum(W[0:3]), sum(K[0:3]))

Python: list1=[]
list2=[]
for i in range(10):
    list1.append(int(input()))
list1.sort(reverse=True)
    
for i in range(10):
    list2.append(int(input()))
list2.sort(reverse=True)

s=sum(list1[0:3])
m=sum(list2[0:3])
print(f'{s} {m}')