Harryxun/stf_run huggingface dataset:
import queue
H,W = map(int,input().split())
maze = list()
q = queue.Queue()
for i in range(H):
   maze.append( [x for x in input()])

maxim = 1
for i in range(H):
    for j in range(W):
        if maze[i][j] == "." :
            maze_score = [[0]*W for k in range(W)]
            maze_score[i][j] = 1
            q.put([i,j])
            
        else :
            continue
        
        while(True):
            if q.empty() :
                if maze_score[x][y] > maxim:
                    maxim = maze_score[x][y]
                break
            [x,y] = q.get()
            
            
            
            
            ##top
            if x != 0:
                if maze_score[x-1][y] ==0 and maze[x-1][y] == ".":
                    maze_score[x-1][y] = maze_score[x][y] +1
                    q.put([x-1,y])
            ##right
            if y != W-1:
                if maze_score[x][y+1] ==0 and maze[x][y+1] == ".":
                    maze_score[x][y+1] = maze_score[x][y] +1
                    q.put([x,y+1])
            ##bottom
            if x != H-1:
                if maze_score[x+1][y] ==0 and maze[x+1][y] == ".":
                    maze_score[x+1][y] = maze_score[x][y] +1
                    q.put([x+1,y])
            ##left
            if y != 0:
                if maze_score[x][y-1] ==0 and maze[x][y-1] == ".":
                    maze_score[x][y-1] = maze_score[x][y] +1
                    q.put([x,y-1])
        
print(maxim-1)


### FIXED CODE ###

import queue
H,W = map(int,input().split())
maze = list()
q = queue.Queue()
for i in range(H):
   maze.append( [x for x in input()])

maxim = 1
for i in range(H):
    for j in range(W):
        if maze[i][j] == "." :
            maze_score = [[0]*W for k in range(H)]
            maze_score[i][j] = 1
            q.put([i,j])
            
        else :
            continue
        
        while(True):
            if q.empty() :
                if maze_score[x][y] > maxim:
                    maxim = maze_score[x][y]
                break
            [x,y] = q.get()
            
            
            
            
            ##top
            if x != 0:
                if maze_score[x-1][y] ==0 and maze[x-1][y] == ".":
                    maze_score[x-1][y] = maze_score[x][y] +1
                    q.put([x-1,y])
            ##right
            if y+1 != W:
                if maze_score[x][y+1] ==0 and maze[x][y+1] == ".":
                    maze_score[x][y+1] = maze_score[x][y] +1
                    q.put([x,y+1])
            ##bottom
            if x != H-1:
                if maze_score[x+1][y] ==0 and maze[x+1][y] == ".":
                    maze_score[x+1][y] = maze_score[x][y] +1
                    q.put([x+1,y])
            ##left
            if y != 0:
                if maze_score[x][y-1] ==0 and maze[x][y-1] == ".":
                    maze_score[x][y-1] = maze_score[x][y] +1
                    q.put([x,y-1])
        
print(maxim-1)
import sys

args = sys.argv

num = args[0]
slimes = args[1]
if __name__ == "__main__":
  tmp = []
  for i in range(0,len(smiles)):
    if len(tmp): 
      if slimes[i] == slimes[i+1] and slimes[i] != tmp[-1]:
          tmp.append(slimes[i])
    else:
      if slimes[i] == slimes[i+1]:
          tmp.append(slimes[i])

  print(len(tmp))    


### FIXED CODE ###

if __name__ == "__main__":
  num = input()
  slimes = input()

  tmp = []
  for i in range(0,len(slimes)):
    if len(tmp):
      if slimes[i] != tmp[-1]:
          tmp.append(slimes[i])
    else:
      tmp.append(slimes[i])
  print(len(tmp))
import numpy as np
n = int(input())
s = list(map(int,input().split()))
s1 = np.array(s)
t,r = np.array([]),np.array([])
o = 0
for i in range(n):
    if s[i] not in t:
        t = np.append(t,s[i])
        r = np.append(r,1)
    else:
        p = np.where(t == s[i])
        r[p] += 1

for i in range(len(t)):
    q = r[i] - t[i]
    if q >= 0:
        o += q
    else:
        o += r[i]

print(int(o))

### FIXED CODE ###

n = int(input())
s = list(map(int,input().split()))
t = {}
o = 0
for i in range(n):
    if s[i] not in t.keys():
        t[s[i]] = 1
    else:
        t[s[i]] += 1

for i,j in t.items():
    if i > j:
        o += j
    else:
        o += j - i

print(o)
a,b=map(int,input.split())

if a+b>=10:
  print("error")
else:
  print(a+b)

### FIXED CODE ###

a,b=map(int,input().split())
if (a+b)>=10:
  print("error")
else:
  print(a+b)
#import time
#start = time.time()

# スペース区切りの整数入力
N,M,K = map(int, input().split())

fcnum = [ 0 for i in range(N+1)]
fring = [[] for i in range(N+1)]
frno =  [-1 for i in range(N+1)]

ab = []
for i in range(M):
    aa,bb = map(int, input().split())
    if aa > bb:
        aa,bb = bb,aa
    fcnum[aa] -= 1
    fcnum[bb] -= 1
    ab.append([aa,bb])

for aa,bb in ab:
    if frno[aa] == -1 and frno[bb] == -1:
        frn = aa
        frno[aa] = frn
        frno[bb] = frn
        fring[frn].append(aa)
        fring[frn].append(bb)
    elif frno[aa] == -1 and frno[bb] != -1:
        frn = frno[bb]
        frno[aa] = frn
        fring[frn].append(aa)
    elif frno[aa] != -1 and frno[bb] == -1:
        frn = frno[aa]
        frno[bb] = frn
        fring[frn].append(bb)
    else:
        if frno[aa] != frno[bb]:
            if len(fring[frno[aa]]) > len(fring[frno[bb]]):
                frnto = frno[aa]
                frnfrom = frno[bb]
            else:
                frnto = frno[bb]
                frnfrom = frno[aa]
            fring[frnto].extend(fring[frnfrom])
            for mvf in fring[frnfrom]:
                frno[mvf] = frnto
            del fring[frnfrom]
            #fring[frnfrom] = []

for i in range(K):
    cc,dd = map(int, input().split())
    if frno[cc] == frno[dd]:
        fcnum[cc] -= 1
        fcnum[dd] -= 1

for k in range(1,len(fring)):
    cnum = len(fring[k]) - 1
    for ff in fring[k]:
        fcnum[ff] += cnum

for i in range(1,len(fcnum)):
    print(fcnum[i]," ",end="")

### FIXED CODE ###

# スペース区切りの整数入力
N,M,K = map(int, input().split())

fcnum = [ 0 for i in range(N+1)]
fring = [[] for i in range(N+1)]
frno =  [-1 for i in range(N+1)]

ab = []
for i in range(M):
    aa,bb = map(int, input().split())
    if aa > bb:
        aa,bb = bb,aa
    fcnum[aa] -= 1
    fcnum[bb] -= 1
    ab.append([aa,bb])

for aa,bb in ab:
    if frno[aa] == -1 and frno[bb] == -1:
        frn = aa
        frno[aa] = frn
        frno[bb] = frn
        fring[frn].append(aa)
        fring[frn].append(bb)
    elif frno[aa] == -1 and frno[bb] != -1:
        frn = frno[bb]
        frno[aa] = frn
        fring[frn].append(aa)
    elif frno[aa] != -1 and frno[bb] == -1:
        frn = frno[aa]
        frno[bb] = frn
        fring[frn].append(bb)
    else:
        if frno[aa] != frno[bb]:
            if len(fring[frno[aa]]) > len(fring[frno[bb]]):
                frnto = frno[aa]
                frnfrom = frno[bb]
            else:
                frnto = frno[bb]
                frnfrom = frno[aa]
            fring[frnto].extend(fring[frnfrom])
            for mvf in fring[frnfrom]:
                frno[mvf] = frnto
            fring[frnfrom] = []

for i in range(K):
    cc,dd = map(int, input().split())
    if frno[cc] == frno[dd] and frno[cc] != -1:
        fcnum[cc] -= 1
        fcnum[dd] -= 1

for k in range(1,len(fring)):
    cnum = len(fring[k]) - 1
    for ff in fring[k]:
        fcnum[ff] += cnum

for i in range(1,len(fcnum)):
    print(fcnum[i]," ",end="")
S = int(input())
h = int(S / (60 * 60))
m = int(S / 60) % 60
S = S % 60

print('{}:{}:{}'.format(h,m,s)

### FIXED CODE ###

S = int(input())
h = int(S / (60 * 60))
m = int(S / 60) % 60
s = S % 60

print('{}:{}:{}'.format(h,m,s))
r,g,b=map(int,input().split())
k = (10*g + b)%4
if k == 0 :print('YES')
  else:print('NO')

### FIXED CODE ###

r,g,b=input().split()
gb=g+b #str
if int(gb)%4 ==0:print('YES')
else:print('NO')
N = input()
if int(N) % sum([int(N[i] for i in range(len(N)))]) == 0:
    print("Yes")
else:
    print("No")


### FIXED CODE ###

N = input()
if int(N) % sum([int(N[i]) for i in range(len(N))]) == 0:
    print("Yes")
else:
    print("No")
from collections import Counter
a=list(map(int,input().split()))
s=sum(a)
d=Counter(a)
for i in range(q):
    b,c=map(int,input().split())
    if b in d:
        l=d[b]
        d[b]=0
        d[c]+=l
        s+=(c-b)*l
        print(s)
    else:print(s)

### FIXED CODE ###

from collections import Counter
n=int(input())
a=list(map(int,input().split()))
q=int(input())
s=sum(a)
d=Counter(a)
for i in range(q):
    b,c=map(int,input().split())
    if b in d:
        l=d[b]
        d[b]=0
        d[c]+=l
        s+=(c-b)*l
        print(s)
    else:print(s)
flag = False
a = input().split(' ')
for i in range(3):
  a[i]=int(a[i])
while True:
  for i in range(3):
    if a[i] != 5 and a[i] != 7:
      print('NO')
      frag = True
      break
  if frag == True:
    print(2)
    break
  if a[0] + a[1] + a[2] == 17:
    print('YES')
    break
  else:
    print('NO')
    break

### FIXED CODE ###

f = False
a = input().split(' ')
for i in range(3):
  a[i]=int(a[i])
while True:
  for i in range(3):
    if a[i] != 5 and a[i] != 7:
      print('NO')
      f = True
      break
  if f == True:
    print(2)
    break
  if a[0] + a[1] + a[2] == 17:
    print('YES')
    break
  else:
    print('NO')
    break
N, M = map(int, input().split())

P = {}
A = []
B = []

for _ in range(M):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)

for i in range(1, N + 1):
    P[i] = []

for a, b in zip(A, B):
    P[b].append(a)
    P[a].append(b)

ans = [0] * (N + 1)
ans[1] = 1

def search(numbers):
    next_numbers = []
    for number in numbers:
        for x in P[number]:
            if ans[x] == 0:
                ans[x] = number
                next_numbers.append(x)
    if next_numbers:
        search(next_numbers)

search([1])

print('Yes')
for i in range(2, N + 1):
    print(ans[i])

### FIXED CODE ###

N, M = map(int, input().split())

A = []
B = []

for _ in range(M):
    a, b = map(int, input().split())
    A.append(a)
    B.append(b)

P = [[] for _ in range(N + 1)]

for a, b in zip(A, B):
    P[b].append(a)
    P[a].append(b)

ans = [0] * (N + 1)
ans[1] = 1
next_numbers = [1]

while next_numbers:
    check_number = next_numbers[:]
    next_numbers = []
    for number in check_number:
        for x in P[number]:
            if ans[x] == 0:
                ans[x] = number
                next_numbers.append(x)

print('Yes')
for i in range(2, N + 1):
    print(ans[i])
h,w,k = map(int, input().split())
ls = [list(input()) for i in range(h)]
ansls = [[0]*w for _ in range(h)]
absent = []
idx = 1
for i in range(h):
    if ls[i] == ['.']*w:
        absent.append(i)
    else:
        count=0
        for j in range(w):
            if ls[i][j] == "#":
                if count>0:
                    idx+=1
                count+=1
            ansls[i][j] = idx
        idx+=1

for i in absent:
    idx = i
    if i<h-1:
        while idx in absent:
            idx+=1
    else:
        while idx in absent:
            idx-=1
    ansls[i] = ansls[idx]

for l in ansls:
    print(*l)

### FIXED CODE ###

h,w,k = map(int, input().split())
ls = [list(input()) for i in range(h)]
ansls = [[0]*w for _ in range(h)]
absent = []
idx = 1
for i in range(h):
    if ls[i] == ['.']*w:
        absent.append(i)
    else:
        count=0
        for j in range(w):
            if ls[i][j] == "#":
                if count>0:
                    idx+=1
                count+=1
            ansls[i][j] = idx
        idx+=1

for i in absent:
    idx = i
    while idx in absent:
        idx+=1
    if idx>=h:
        idx = i
        while idx in absent:
            idx-=1
    ansls[i] = ansls[idx]

for l in ansls:
    print(*l)
n,m = map(int,input().split())
digit = [0]*m
num = [0]*m
for i in range(m):
    digit[i], num[i] = map(int, input().split())
for i in range(1000):
    dum = str(i)
    flag = "ok"
    for j in range(m):
        if len(dum) >= (n+1-digit[j]):
            if dum[digit[j]-1] != str(num[j]):
                flag = "ng"
                break
        else:
            flag = "ng"
            break
    if flag == "ok":
        print(dum)
        break
else:
    print(-1)

### FIXED CODE ###

check = 0
check2 = 0
kensa = 0
kekka = "" 
num = []
hantei = "OK"
INF = input().split()
gyosu = int(INF[1])
keta = int(INF[0])
out = []
for l in range(keta):
  out.append(0)


for i in range(gyosu):
  num.append([int(j) for j in input().split()])

if gyosu > 0 :
  check = int(num[0][0])
  check2 = int(num[0][1])
  
  for j in range(gyosu-1):
    for k in range(gyosu-1):
      if num[j][0] == num[k + 1][0]:
        if num[j][1] != num[k + 1][1]:
          hantei = "NG"
    
    if int(num[j][0]) < check: # 入力値にある最大桁数を計算
      check = int(num[j][0])
      check2 = int(num[j][1])
  if check2 == 0:
    if check == 1 and keta == 3:
      hantei = "NG"
    if check == 2:
      hantei = "tokubetu2"
    if check == 3:
      hantei = "tokubetu"

if hantei == "NG":
  print("-1")
else:
  for m in range(gyosu):
    
    out[(num[m][0] - 1)] = num[m][1]
  for n in range(keta):
    kekka = kekka + str(out[n])

  for p  in kekka:
      if p == "0":
        kensa = kensa + 1
      else:
        break
  kekka2 = kekka
  for q in range(kensa):
    if keta != 1:
      kekka = kekka.lstrip("0")
if hantei == "OK":
  if gyosu == 0:
    if keta == 1:
      print("0")
    elif keta == 2:
      print("10")
    else:
      print("100")
  else:
    if keta == 2:
      if kensa == 1:
        kekka = "1" + kekka
    if keta == 3:
      if kensa == 1:
        kekka = "1" + kekka
      if kensa == 2:
        kekka = "10" + kekka
    print(kekka)

if hantei == "tokubetu":
  print("0")


if hantei == "tokubetu2":
  #kekka2 = kekka2.lstrip("0")
  kekka2 = kekka2[1:]
  kekka2 = "1" + kekka2
  print(kekka2)
import queue
N,M = map(int,input().split())
tree = [[] for _ in range(M+1)]
for i in range(M):
    a,b = map(int,input().split())
    tree[a].append([b,-1])
    tree[b].append([a,-1])

que = queue.Queue()
que.put(1)
result = [-1]*(N+1)
for i in range(len(tree[1])):
    tree[1][i][1] = 1
while(True):
    if que.empty():
        break
    nex = que.get()
    
    for i in tree[nex]:
        if result[i[0]] == -1:
            result[i[0]] = nex
            que.put(i[0])


result = result[2:]
if result.count(-1) != 0:
    print("No")
else :
    print("Yes")
    for i in result:
        print(i)


### FIXED CODE ###

import queue
N,M = map(int,input().split())
tree = [[] for _ in range(N+1)]
for i in range(M):
    a,b = map(int,input().split())
    tree[a].append(b)
    tree[b].append(a)

que = queue.Queue()
que.put(1)
result = [-1]*(N+1)
result[1] = 0
while(True):
    if que.empty():
        break
    start = que.get()
    for i in tree[start]:
        if result[i] == -1:
            result[i] = start
            que.put(i)

if -1 in result[2:]:
    print("No")
else:
    print("Yes")
    for i in result[2:]:
        print(i)
s=input()
if s[5] == '1':
  print('TBD')
else:
  if s[6] > 4:
    print('TBD')
  else:
    print('Heisei')

### FIXED CODE ###

S = list(input())
a = int(S[5]+S[6])

if a <= 4:
    ans = "Heisei"
else:
    ans = "TBD"
print(ans)
from collections import Counter

class UnionFind:
    def __init__(self, size):
        self.data = [-1] * size

    def find(self, x):
        if self.data[x] < 0:
            return x
        else:
            self.data[x] = self.find(self.data[x])
            return self.data[x]

    def union(self, x, y):
        x, y = self.find(x), self.find(y)
        if x != y:
            if self.data[y] < self.data[x]:
                x, y = y, x
            self.data[x] += self.data[y]
            self.data[y] = x
        return (x != y)

    def same(self, x, y):
        return (self.find(x) == self.find(y))

    def size(self, x):
        return -self.data[self.find(x)]


MAX = 10 ** 5
uf = UnionFind(2 * MAX)

N, *XY = map(int, open(0).read().split())

for x, y in zip(*[iter(XY)] * 2):
    uf.union(x, y + MAX)

X = Counter(uf.find(i) for i in range(MAX))
Y = Counter(uf.find(i) for i in range(MAX, MAX * 2))
res = sum(X[i] * Y[i] for i in range(MAX * 2))

print(res - N)


### FIXED CODE ###

from collections import Counter

class UnionFind:
    def __init__(self, size):
        self.data = [-1] * size

    def find(self, x):
        if self.data[x] < 0:
            return x
        else:
            self.data[x] = self.find(self.data[x])
            return self.data[x]

    def union(self, x, y):
        x, y = self.find(x), self.find(y)
        if x != y:
            if self.data[y] < self.data[x]:
                x, y = y, x
            self.data[x] += self.data[y]
            self.data[y] = x
        return (x != y)

    def same(self, x, y):
        return (self.find(x) == self.find(y))

    def size(self, x):
        return -self.data[self.find(x)]


MAX = 10 ** 5 + 10
uf = UnionFind(2 * MAX)

N, *XY = map(int, open(0).read().split())

for x, y in zip(*[iter(XY)] * 2):
    uf.union(x, y + MAX)

X = Counter(uf.find(i) for i in range(MAX))
Y = Counter(uf.find(i) for i in range(MAX, MAX * 2))
res = sum(X[i] * Y[i] for i in range(MAX * 2))

print(res - N)
n = int(input())
a = map(int, input().split(" "))

d = dict()
for a_i in a:
	if a_i not in d:
		d[a_i] = 0
	d[a_i] += 1
d = sum([[d_i[0] for i in range(d_i[1]//2)] for d_i in d.items()], [])

d.sort(reverse=True)
print(d[0] * d[1])

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split(" ")))

a.sort()
maxs = []
for i in range(2):
	max_1 = a.pop()
	while True:
		max_2 = a.pop()
		if max_1 == max_2:
			maxs.append(max_1)	
			break
		max_1 = max_2
		if len(a) == 0:
			print(0)
			exit()
print(maxs[0]*maxs[1])
s,t = input().split()
return t + s

### FIXED CODE ###

s, t = input().split()
print(t + s)
d,g=map(int,input().split())
pc={_:(list(map(int,input().split()))) for _ in range(d)}
bin_lst=[]
if 1<d:
    d2=d**2-1
else:
    d2=1
for x in range(d2):
    buf=bin(x)[2:]
    len_buf=len(buf)
    if len_buf<d:
        buf='0'*(d-len_buf)+buf
    bin_lst.append(buf)
lst_cnt=[]
buf_lst=[]
for x in bin_lst:
    cnt=0
    buf_int=0
    len_x=len(x)
    for y in range(d):
        if x[y]=="1":
            buf_lst=pc[y]
            buf_int+=(y+1)*100*buf_lst[0]+buf_lst[1]
            cnt+=buf_lst[0]
    if buf_int<g:
        buf_index=x.rfind("0")
        buf_lst=pc[buf_index]
        i=buf_lst[0]
        for z in range(1,i):
            if buf_int+(buf_index+1)*100*z>=g:
                buf_int+=(buf_index+1)*100*z
                cnt+=z
                break
    if buf_int>=g:
        lst_cnt.append(cnt)
print(min(lst_cnt))

### FIXED CODE ###

d,g=map(int,input().split())
pc={_:(list(map(int,input().split()))) for _ in range(d)}
bin_lst=[]
d2=2**d
for x in range(d2):
    buf=bin(x)[2:]
    len_buf=len(buf)
    if len_buf<d:
        buf='0'*(d-len_buf)+buf
    bin_lst.append(buf)
lst_cnt=[]
buf_lst=[]
for x in bin_lst:
    cnt=0
    buf_int=0
    len_x=len(x)
    for y in range(d):
        if x[y]=="1":
            buf_lst=pc[y]
            buf_int+=(y+1)*100*buf_lst[0]+buf_lst[1]
            cnt+=buf_lst[0]
    if buf_int<g:
        buf_index=x.rfind("0")
        buf_lst=pc[buf_index]
        i=buf_lst[0]
        for z in range(1,i):
            if buf_int+(buf_index+1)*100*z>=g:
                buf_int+=(buf_index+1)*100*z
                cnt+=z
                break
    if buf_int>=g:
        lst_cnt.append(cnt)
print(min(lst_cnt))
a,b,k=map(int,input().split())

lis=[]
for i in range(a, min(a+k,b+1)):
    lis.append(i)
for i in range(max(a,b-k+1), b+1):
    lis.append(i)


lis=list(set(l)) #重複除去
lis.sort()
for i in lis:
    print(i)
    


### FIXED CODE ###

a,b,k=map(int,input().split())

lis=[]
for i in range(a, min(a+k,b+1)):
    lis.append(i)
for i in range(max(a,b-k+1), b+1):
    lis.append(i)


lis=list(set(lis)) #重複除去
lis.sort()
for i in lis:
    print(i)
n = int(input())
l = list(map(int,input().split()))
a = 0
b = 0
l.sort(reverser=True)
for i in range(n):
  if i % 2 == 0:
    a += l[i]
  else:
    b += l[i]
print(a-b)

### FIXED CODE ###

n = int(input())
l = list(map(int,input().split()))
a = 0
b = 0
l.sort(reverse=True)
for i in range(n):
  if i % 2 == 0:
    a += l[i]
  else:
    b += l[i]
print(a-b)
print("second" if all([int(input()) % 2 == 0 for i in range(input())]) else "first")


### FIXED CODE ###

'''input
3
1
30000
20000
'''
import time
import math

n = int(input())
print("second" if all([int(input()) % 2 == 0 for i in range(n)]) else "first")
n = int(input())
w = []

for i in range(n):
    s = input()
    if s in w:
        flag = 0
        break
    else:
        w.append(s)

for i in range(1, n-1):
    if w[i][-1] != w[i+1][0]:
        flag = 0
        break

if flag == 0:
    print('No')
else:
    print('Yes')

### FIXED CODE ###

n = int(input())
w = []
flag = 1

for i in range(n):
    s = input()
    if s in w:
        flag = 0
        break
    else:
        w.append(s)

if flag != 0:
    if w[0][-1] != w[1][0]:
        flag = 0
    for i in range(1, n-1):
        if w[i][-1] != w[i+1][0]:
            flag = 0
            break

if flag == 0:
    print('No')
else:
    print('Yes')
imort sys
readline = sys.stdin.readline
X, Y, Z, K = map(int, readline().split())
A = sorted(list(map(int, readline().split())), reverse=True)
B = sorted(list(map(int, readline().split())), reverse=True)
C = sorted(list(map(int, readline().split())), reverse=True)

ABC = []
for a in range(X):
    for b in range(Y):
        if (a+1)*(b+1) > K:
            break
        for c in range(Z):
            if (a+1)*(b+1)*(c+1) > K:
                break
            ABC.append(A[a] + B[b] + C[c])
ABC.sort(reverse=True)
print("\n".join(map(str, ABC[:K])))


### FIXED CODE ###

import sys
readline = sys.stdin.readline
X,Y,Z,K = map(int, readline().split())
a = sorted(list(map(int, readline().split())), reverse=True)
b = sorted(list(map(int, readline().split())), reverse=True)
c = sorted(list(map(int, readline().split())), reverse=True)

ab = []
for ai in a:
    for bj in b:
        ab.append(ai+bj)
ab.sort(reverse=True)
ab = ab[:K]
cond = []
for abi in ab:
    for cj in c:
        cond.append(abi+cj)
cond = sorted(cond, reverse=True)[:K]
for condi in cond:
    print(condi)
import numpy as np
from numba import njit
 
@njit('i8(i8)', cache=True)
def solve(x):
    count = np.ones(x + 1, dtype=np.int8)
    for i in range(2,x+1):
        for j in range(i,x+1,i)
            count[j] += 1
    return int(np.sum(np.arange(x + 1) * count))
 
if __name__== "__main__":
    x = int(input())
    print(solve(x))

### FIXED CODE ###

import numpy as np
from numba import *

@njit('i8(i8,i8[:])', cache=True)
def solve(x,count):
    for i in range(2,x+1):
        for j in range(i,x+1,i):
            count[j] += 1
    return int(np.sum(np.arange(x+1)*count))

if __name__== "__main__":
    x = int(input())
    count = np.ones(x + 1, dtype=np.int64)
    print(solve(x,count))
import statistics
N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]
for i in range(M):
    if t[i] in s:
        s.remove(t[i])
if s ==list():
    print(0)
else:
    print(s.count(statistics.mode(s)))

### FIXED CODE ###

import collections
N = int(input())
s = [input() for i in range(N)]
M = int(input())
t = [input() for i in range(M)]
for i in range(M):
    if t[i] in s:
        s.remove(t[i])
if s ==list():
    print(0)
else:
    print(s.count(collections.Counter(s).most_common()[0][0]))
length0 = input()
print(length0)
#length = length0.split()
#a = length[0]
#b = length[1]
#print(str(a)+" "+str(b))
#area = a*b
#per = 2*a+2*b
#print(str(area)+" "+str(per))


### FIXED CODE ###

length0 = input()
#print(length0)
length = length0.split()
a = int(length[0])
b = int(length[1])
#print(str(a)+" "+str(b))
area = a*b
per = 2*a+2*b
print(str(area)+" "+str(per))