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

W=[]
for j in range(10):
    W.append(list[j])
K=[]
for n in range(10,20):
    K.append(list[n])

w=sorted(W)
k=sorted(K)

wsum=0
ksum=0

for m in range(7,10):
    wsum+=int(w[m])
    ksum+=int(k[m])

print(wsum,ksum)

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

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

w.sort(reverse=True)
k.sort(reverse=True)

score_w = sum(w[:3])
score_k = sum(k[:3])

print(score_w, score_k)

Python: w=[]
for i in range(10):
    n=int(input())
    w.append(n)
wa = sorted(w, reverse=True)
W=sum(wa[:3])

k=[]
for j in range(10):
    m=int(input())
    k.append(m)
ka = sorted(k, reverse=True)
K=sum(ka[:3])

print(W, 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=[]
K=[]
for i in range(10):
    S1=int(input())
    W.append(S1)
for j in range(10):
    S2=int(input())
    K.append(S2)
J1=0
J2=0
for k in range(3):
    J1+=max(W)
    W.remove(max(W))
    J2+=max(K)
    K.remove(max(K))
print(J1,J2,sep=' ')

Python: for h in range(2):
    u=[]
    for i in range(10):
        a=int(input())
        u.append(a)
    u.sort()
    for j in range(7):
        u.pop(0)
    if h==1:
        print(sum(u))
    else:
        print(sum(u),end=' ')

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)
point_W = sum(W[:3])
point_K = sum(K[:3])
print(point_W,point_K)

Python: W=[int(input()) for i in range(10)]
K=[int(input()) for i in range(10)]
W.sort()
K.sort()
print(sum(W[7:10]),sum(K[7:10]))

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)
    point_W = sum(W[:3])
    point_K = sum(K[:3])

print(point_W, point_K)

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



b=[int(input()) for i in range(10)]
b.sort()
print(sum((a[-3:])),sum((b[-3:])))

Python: W= [int(input()) for i in range(10)]
K= [int(input()) for i in range(10)]
W.sort(reverse = True)
K.sort(reverse = True)
print(sum(W[:3]),sum(K[: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(W[7]+W[8]+W[9],K[7]+K[8]+K[9])

Python: l=[]
m=[]
s=0
for i in range(20):
    a=int(input())
    if s<10:
        l.append(a)
    else:
        m.append(a)
   
    s=s+1
    
l=sorted(l,reverse=True)
m=sorted(m,reverse=True)





print(l[0]+l[1]+l[2],m[0]+m[1]+m[2])

Python: list_w = []
list_k = []
for x in range(10):
    list_w.append(int(input()))
list_w.sort(reverse = True)
for x in range(10):
    list_k.append(int(input()))
list_k.sort(reverse = True)
print(str(sum(list_w[0:3])) +' '+ str(sum(list_k[0:3])))

Python: W = [int(input()) for i in range(10)]
K = [int(input()) for j in range(10)]
W.sort(reverse=True)
K.sort(reverse=True)
Sum_W = sum(W[0:3])
Sum_K = sum(K[0:3])
print(Sum_W,Sum_K)

Python: a = [int(input()) for i in range(20)]
w = a[0:10]
k = a[10:20]
w.sort()
k.sort()
w1 = sum(w[7:10])
k1 = sum(k[7:10])
print(w1,k1)

Python: lstr=[int(input()) for i in range(10)]
lsts=[int(input()) for j in range(10)]

mr=max(lstr)
mr2=sorted(lstr)[-2]
mr3=sorted(lstr)[-3]
ms=max(lsts)
ms2=sorted(lsts)[-2]
ms3=sorted(lsts)[-3]
print(mr+mr2+mr3,ms+ms2+ms3)

Python: L = []
for i in range(10):
    a = int(input())
    L.append(a)
    N = sorted(L)
A = (N[len(N) - 1]) + (N[len(N) - 2]) + (N[len(N) - 3])

l = []
for i in range(10):
    b = int(input())
    l.append(b)
    M = sorted(l)
B = (M[len(M) - 1]) + (M[len(M) - 2]) + (M[len(M) - 3])

print( A , end = " ")
print( B )

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

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

Python: W=list()
K=list()
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[-3:]),sum(K[-3:]))

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

Python: A=[]
B=[]
for i in range(10):
    w=int(input())
    A.append(w)
for j in range(10):
    k=int(input())
    B.append(k)
C=sorted(A)
D=sorted(B)
print(sum(C[7:10]),sum(D[7:10]))

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



b=[int(input()) for i in range(10)]
b.sort()
print(sum((a[-3:])),sum((b[-3:])))

Python: x=[]
y=[]
W=0
K=0

for i in range(10):
    n=int(input())
    x.append(n)
#print(x)
for j in range(10):
    n=int(input())
    y.append(n)
#print(y)


for k in range(7):
    x.remove(min(x))
#print(x)
for l in range(7):
    y.remove(min(y))
#print(y)


for m in range(3):
    W+=x[m]
print(W,end=' ')
for n in range(3):
    K+=y[n]
print(K)

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

list2.sort()
list2.reverse()
print(f'{(list1[0]+list1[1]+list1[2])} {(list2[0]+list2[1]+list2[2])}')

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

Python: W = []
K = []

for i in range(10) :
    W.append(int(input()))
    
for j in range(10) :
    K.append(int(input()))
    
Ws = sorted(W, reverse = True)
Ks = sorted(K, reverse = True)

w = 0
k = 0

for i in range(3) :
    w += Ws[i]
    k += Ks[i]
    
print(w, k)

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: 
a=[]
b=[]
A=[]
B=[]
for i in range(20):
    if i<=9:
        a.append(int(input()))
    else:
        b.append(int(input()))
        
for n in range(3):
    s=max(a)
    A.append(s)
    a.remove(s)

        
for m in range(3):
    t=max(b)
    B.append(t)
    b.remove(t)
    
print(sum(A),sum(B))

Python: x=[]
y=[]
for i in range(10):
    s=int(input())
    x.append(int(s))
a=sorted(x)
A=sum(a[7:10])

for i in range(10):
    s=int(input())
    y.append(int(s))
b=sorted(y)
B=sum(b[7:10])
print(A,B)

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)
point_W = sum(W[:3])
point_K = sum(K[:3])
print(point_W,point_K)

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()
w = W[7] + W[8] + W[9]
k = K[7] + K[8] + K[9]
print(w,k)

Python: A=[int(input()) for i in range(10)]
B=[int(input()) for r in range(10)]
A.sort(reverse=True)
B.sort(reverse=True)
C=sum(A[:3])
D=sum(B[:3])
print(int(C),int(D))

Python: list=[]

for i in range(20):
    n=int(input())
    list.append(n)


list1=list[:10]
list2=list[10:]

list1.sort()
list2.sort()

del list1[0:7]
del list2[0:7]
print(sum(list1),sum(list2))