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_1=[]
list_2=[]
x=0
y=0

for i in range(10):
   a=int(input())
   list_1.append(a)
for j in range(10):
   b=int(input())
   list_2.append(b)

list_1.sort(reverse=True)
list_2.sort(reverse=True)

for m in range(3):
   x+=list_1[m]
   y+=list_2[m]

print(x,y)

Python: lst=[]
lt=[]
for i in range (10):
    n=int(input())
    lst.append(n)
lst.sort()
for i in range(7):
    lst.pop(0)

    
for i in range (10):
    m=int(input())
    lt.append(m)
lt.sort()
for i in range(7):
    lt.pop(0)

    
a=sum(lst)
b=sum(lt)
print(f'{a:.3g} {b:.3g}')

Python: max_W1 = 0
max_W2 = 0
max_W3 = 0
sum_W = 0
max_K1 = 0
max_K2 = 0
max_K3 = 0
sum_K = 0

for i in range(10):
    W = int(input())
    if max_W1 < W:
        max_W3 = max_W2
        max_W2 = max_W1
        max_W1 = W
    elif max_W2 < W:
        max_W3 = max_W2
        max_W2 = W
    elif max_W3 < W:
        max_W3 = W
        
for j in range(10):
    K = int(input())
    if max_K1 < K:
        max_K3 = max_K2
        max_K2 = max_K1
        max_K1 = K
    elif max_K2 < K:
        max_K3 = max_K2
        max_K2 = K
    elif max_K3 < K:
        max_K3 = K
        
sum_W = max_W1 + max_W2 + max_W3
sum_K = max_K1 + max_K2 + max_K3
print(sum_W, sum_K)

Python: w = [int(input()) for w in range(10)]
k = [int(input()) for k in range(10)]

w = sorted(w)
k = sorted(k)

print(sum(w[7:]),sum(k[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],K[0]+K[1]+K[2])

Python: list_w=[]
for x in range(10):
    x=int(input())
    list_w.append(x)
    
list_k=[]    
for y in range(10):
    y=int(input())
    list_k.append(y)
    
list_w.sort()
list_k.sort()

a=list_w[9]+list_w[8]+list_w[7]
b=list_k[9]+list_k[8]+list_k[7]

print(a,b)

Python: S=[]
for i in range(10):
    n=int(input())
    S.append(n)
    i+=1
    
T=[]
for j in range(10):
    m=int(input())
    T.append(m)
    j+=1
    
A=[]
for k in range(3):
    a=max(S)
    S.remove(a)
    A.append(a)
    
B=[]
for l in range(3):
    b=max(T)
    T.remove(b)
    B.append(b)
    
P=sum(A)
Q=sum(B)

print(P,Q)

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

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

for i in range(10):
    for j in range(9,0,-1):
        if listw[j-1]<listw[j]:
            listw[j-1],listw[j] = listw[j],listw[j-1]

for i in range(10):
    for j in range(9,0,-1):
        if listk[j-1]<listk[j]:
            listk[j-1],listk[j] = listk[j],listk[j-1]

W = listw[0] + listw[1] + listw[2]
K = listk[0] + listk[1] + listk[2]

print(W,K)

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

Python: W = list(int(input()) for w in range(10))
w = sorted(W, reverse=True)
K = list(int(input()) for k in range(10))
k = sorted(K, reverse=True)
print(sum(w[:3]) , sum(k[:3]))

Python: k = []
for num1 in range(2):
    w = []
    num3 = 0
    for num in range(10):
        i = int(input())
        w.append(i)
    w.sort()
    for num2 in range(7,10):
        num3 += w[num2]
    k.append(num3)
print(str(k[0]) + " " + str(k[1]))

Python: a = []
for i in range(10):
  a.append(int(input()))
b = []
for j in range(10):
  b.append(int(input()))
la = sorted(a, reverse=True)
x = la[:3]
lb = sorted(b, reverse=True)
y = lb[:3]
print(sum(x), sum(y))

Python: def func():
  lst = []
  for i in range(10):
    lst.append(int(input()))
  lst.sort()
  return sum(lst[-3:])
print(func(),func())

Python: a = [int(input()) for i in range(10)]
b=[]
b=sorted(a, reverse=True)[:3]
print(b[0]+b[1]+b[2],end=' ')
c= [int(input()) for i in range(10)]
d=[]
d=sorted(c, reverse=True)[:3]
print(d[0]+d[1]+d[2])

Python: w=sorted([int(input())for i in range(10)],reverse=True)
k=sorted([int(input())for i in range(10)],reverse=True)
pt=[str(w[0]+w[1]+w[2]),str(k[0]+k[1]+k[2])]
print(" ".join(pt))

Python: W = [int(input()) for _ in range(10)]
K = [int(input()) for _ in range(10)]
W.sort(reverse=True)
K.sort(reverse=True)
print('{0} {1}'.format(sum(W[0:3]), sum(K[0:3])))

Python: w=[]
for i in range(10):
    a=int(input())
    w.append(a)
    
w=sorted(w,reverse=True)
w=w[:3]
 
k=[]    
for j in range(10):
    a=int(input())
    k.append(a)
    
k=sorted(k,reverse=True)
k=k[:3]

print(sum(w),sum(k))

Python: W=[]
K=[]
for i in range(20):
    n=int(input())
    if i<10:
        W.append(n)
    else:
        K.append(n)

list.sort(W,reverse=True)
list.sort(K,reverse=True)
print(W[1]+W[2]+W[0],end=" ")
print(K[1]+K[2]+K[0])

Python: W = []
K = []
for i in range(1,21):
    a= int(input())
    if i<11:
        W.append(a)
    else:
        K.append(a)
    i += 1
w = sorted(W, reverse=True)
k = sorted(K, reverse=True)
b = [w[0],w[1],w[2]]
c = [k[0],k[1],k[2]]
print(sum(b),sum(c))

Python: a=[int(input()) for i in range(10)]
b=[int(input()) for i in range(10)]
a.sort() #昇順（小→大）
b.sort()
print(a[7]+a[8]+a[9],b[7]+b[8]+b[9])

Python: w = [int(input()) for _ in range(10)]
k = [int(input()) for _ in range(10)]
print(sum(sorted(w)[7:]), sum(sorted(k)[7:]))

Python: print(sum(sorted([int(input()) for _ in range(10)])[7:10]),sum(sorted([int(input()) for _ in range(10)])[7:10]))

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

Python: lst = []

for i in range(20):
    r = int(input())
    lst.append(r)
    
for i in range(10):
    for j in range(9,i,-1):
        if lst[j] < lst[j-1]:
            lst[j],lst[j-1] = lst[j-1],lst[j]

for i in range(10,20):
    for j in range(19,i,-1):
        if lst[j] < lst[j-1]:
            lst[j],lst[j-1] = lst[j-1],lst[j]

W = lst[9]+lst[8]+lst[7]
K = lst[19]+lst[18]+lst[17]

print(W,K)

Python: s = [int(input()) for _ in range(20)]
print(sum(sorted(s[:10], reverse=True)[:3]),
          sum(sorted(s[10:], reverse=True)[:3]))

Python: n=[int(input()) for i in range(10)]
m=[int(input()) for j in range(10)]
n.sort()
n.reverse()
m.sort()
m.reverse()
w=sum(n[0:3])
k=sum(m[0:3])
print(w,k)

Python: 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: lst = []

for i in range(20):
    r = int(input())
    lst.append(r)
    
for i in range(10):
    for j in range(9,i,-1):
        if lst[j] < lst[j-1]:
            lst[j],lst[j-1] = lst[j-1],lst[j]

for i in range(10,20):
    for j in range(19,i,-1):
        if lst[j] < lst[j-1]:
            lst[j],lst[j-1] = lst[j-1],lst[j]

W = lst[9]+lst[8]+lst[7]
K = lst[19]+lst[18]+lst[17]

print(W,K)

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 = [int(input()) for i in range(10)]
K = [int(input()) for i in range(10)]

W_sorted = sorted(W)
K_sorted = sorted(K)

W_top_three = sum(W_sorted[7:])
K_top_three = sum(K_sorted[7:])

print("{} {}".format(W_top_three, K_top_three))

Python: lst=[]
for i in range(20):
    n=int(input())
    lst.append(n)

lst1=lst[0:10]
lst2=lst[10:20]
lst1.sort(reverse=True)
lst2.sort(reverse=True)
lst3=lst1[0:3]
lst4=lst2[0:3]

print(sum(lst3),sum(lst4))