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: wk = [int(input()) for _ in range(20)]
print(sum(sorted(wk[:10])[7:]), sum(sorted(wk[10:])[7:]))

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)

sum_W = sum(list_W[0:3])
sum_K = sum(list_K[0:3])

print(sum_W, sum_K)

Python: a=int(input())
b=int(input())
c=int(input())
d=int(input())
e=int(input())
f=int(input())
g=int(input())
h=int(input())
i=int(input())
j=int(input())
k=int(input())
l=int(input())
m=int(input())
n=int(input())
o=int(input())
p=int(input())
q=int(input())
r=int(input())
s=int(input())
t=int(input())

x = (a,b,c,d,e,f,g,h,i,j)
y = (k,l,m,n,o,p,q,r,s,t)
z = sorted(x)
w = sorted(y)

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

Python: wsd = []
ko = []

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

print(sum(wsd[7:]),sum(ko[7:]))

Python: alist = []
blist = []
for i in range(10):
    a = int(input())
    alist.append(a)
for i in range(10):
    b = int(input())
    blist.append(b)
x = sorted(alist)
y = sorted(blist)
list.sort(x, reverse=True)
list.sort(y, reverse=True)
s=x[0]+x[1]+x[2]
t=y[0]+y[1]+y[2]
print(s,t)

Python: a=[int(input()) for i in range(20)]
b=a[0:10]
c=a[10:20]
b.sort(reverse=True)
c.sort(reverse=True)
print(sum(b[:3]),sum(c[: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: 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: i=0
x=[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]
k2=0
j2=10
while i<20 :
    x[i]=int(input())
    i=1+i
while k2<9 :
    k=0
    while k<9 :
        if x[k]<x[k+1] : 
            ex=x[k]
            x[k]=x[k+1]
            x[k+1]=ex
        k=k+1
    k2=k2+1
while j2<19 :
    j=10
    while j<19 :
        if x[j]<x[j+1] : 
            ex=x[j]
            x[j]=x[j+1]
            x[j+1]=ex
        j=j+1
    j2=j2+1

ave1=x[0]+x[1]+x[2]
ave2=x[10]+x[11]+x[12]
print(ave1,end=" ")
print(ave2)

Python: dataW = [] 
dataK = []

for i in range (10):
    a = int(input())
    dataW.append(a)
dataW.sort()
pointW = dataW[9]+dataW[8]+dataW[7]
    
for i in range(10):
    a = int(input())
    dataK.append(a)
dataK.sort()
pointK = dataK[9]+dataK[8]+dataK[7]

print(pointW, pointK)

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)

sum_W = sum(list_W[0:3])
sum_K = sum(list_K[0:3])

print(sum_W, sum_K)

Python: N=10
M=10
sumW=0
sumK=0
I=[int(input()) for _ in range(N)]
I.sort()
sumW=sumW+I[9]+I[8]+I[7]
J=[int(input()) for _ in range(M)]
J.sort()
sumK=sumK+J[9]+J[8]+J[7]
print(sumW,sumK)

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)

sum_W = sum(list_W[0:3])
sum_K = sum(list_K[0:3])

print(sum_W, sum_K)

Python: a=[int(input()) for i in range(20)]
b=[a[0],a[1],a[2],a[3],a[4],a[5],a[6],a[7],a[8],a[9]]
c=[a[10],a[11],a[12],a[13],a[14],a[15],a[16],a[17],a[18],a[19]]
b.sort()
c.sort()
print(sum(b[7:10]),sum(c[7:10]))

Python: w=[]
k=[]

for i in range(0,10):
    w.append(int(input()))
    w.sort(reverse=True)
    sum_w=sum(w[0:3])
for i in range(10,20):
    k.append(int(input()))
    k.sort(reverse=True)
    sum_k=sum(k[0:3])
print(sum_w,sum_k)

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

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

print(f"{W[7]+W[8]+W[9]} {K[7]+K[8]+K[9]}")

Python: #import math

while True:
    w = []
    k = []
    for i in range(10):
        w.append(int(input()))
    for i in range(10):
        k.append(int(input()))
    w.sort()
    w.reverse()
    k.sort()
    k.reverse()
    print(w[0]+w[1]+w[2],k[0]+k[1]+k[2])

Python: import heapq
list=[]
a=[int(input()) for i in range(20)]
b=a[:10]
c=a[10:20]
print(sum(heapq.nlargest(3,b)),sum(heapq.nlargest(3,c)))

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

Python: W=[]
K=[]
i = 1
while i<=10:
    wi = int(input())
    W.append(wi)
    i += 1

m = 1
while m <= 10:
    km = int(input())
    K.append(km)
    m += 1

W3 = sorted(W, reverse=True)
a = W3[:3]
K3 = sorted(K, reverse =True)
b = K3[:3]

print(sum(a), sum(b))

Python: print(*[sum(sorted(int(input())for _ in[0]*10)[7:])for _ in'12'])

Python: num1=[]
num2=[]
for i in range(10):
    x=int(input())
    num1.append(x)
    
for i in range(10):
    y=int(input())
    num2.append(y)   
    
num1.sort()
num2.sort()

a=num1[7]+num1[8]+num1[9]
b=num2[7]+num2[8]+num2[9]

print(a,b)

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

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: # -*- coding: utf-8 -*-
"""
http://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=0533

"""
import sys
from sys import stdin
input = stdin.readline

def main(args):
    W_scores = [int(input()) for _ in range(10)]
    K_scores = [int(input()) for _ in range(10)]
    W_scores.sort()
    K_scores.sort()

    W_sum = sum(W_scores[-3:])
    K_sum = sum(K_scores[-3:])
    print(W_sum, K_sum)


if __name__ == '__main__':
    main(sys.argv[1:])

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

Python: print(*[sum(sorted(int(input())for _ in[0]*10)[7:])for _ in'12'])

Python: #45 コンテスト

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

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

W1 = W[0:3]
K1 = K[0:3]

print(sum(W1), sum(K1))

Python: def main():
    a = []
    b = []
    for _ in range(10):
        a.append(int(input()))
    for _ in range(10):
        b.append(int(input()))
    a_sum = 0
    b_sum = 0
    for x in a:
        a_sum += x
    for x in b:
        b_sum += x
    print(a_sum, b_sum)


if __name__ == "__main__":
    main()

Python: import sys
import math

w = sorted( [int(input()) for i in range(10)] )
k = sorted( [int(input()) for i in range(10)] )

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

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

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

list.sort(w); list.sort(k)

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

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: 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]))