Harryxun/stf_run huggingface dataset:
X,Y,Z,K = map(int, input().split())
A = list(map(int,input().split()))
B = list(map(int,input().split()))
C = list(map(int,input().split()))
A.sort()
A.reverse()
B.sort()
B.reverse()
C.sort()
C.reverse()


array = []
tmp = []

for a in A:
  for b in B:
    tmp.append(a+b)
tmp.sort()
tmp.reverse()

for i in range(K):
  for c in C:
    array.append(tmp[i]+c)

array.sort()
array.reverse()

for i in range(K):
  print(array[i])

### FIXED CODE ###

from heapq import heappop, heappush,heapify
X,Y,Z,K = map(int, input().split())
A = [int(i) for i in input().split()]
B = [int(i) for i in input().split()]
C = [int(i) for i in input().split()]
A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)
H = []
heappush(H,[-1*(A[0]+B[0]+C[0]),0,0,0])
count = 1
memo = []
while H and count <= K:
  tmp,i,j,k = heappop(H)
  print(-1*tmp)
  count += 1
  if i+1 < X and ((i+1,j,k) not in memo):
    heappush(H,[-1*(A[i+1]+B[j]+C[k]),i+1,j,k])
    memo.append((i+1,j,k))
  if j+1 < Y and ((i,j+1,k) not in memo):
    heappush(H,[-1*(A[i]+B[j+1]+C[k]),i,j+1,k])
    memo.append((i,j+1,k))
  if k+1 < Z and ((i,j,k+1) not in memo):
    heappush(H,[-1*(A[i]+B[j]+C[k+1]),i,j,k+1])
    memo.append((i,j,k+1))
a1 = raw_input()
a2 = raw_input()
a3 = raw_input()
if(a1+a2+a3<22):
 print("win")
else:
 print("bust")


### FIXED CODE ###

a1,a2,a3 = map(int,input().split())
if(a1+a2+a3<22):
 print("win")
else:
 print("bust")
H=int(input())
A=int(input())
a=int(H/A)
if H%A!=0:
    a+=1
print(a)

### FIXED CODE ###

H,A=map(int,input().split())
a=int(H/A)
if H%A!=0:
    a+=1
print(a)
import numpy as np

#### 入力フェーズ開始 ####
HWD = input().split()
H = int(HWD[0])
W = int(HWD[1])
D = int(HWD[2])

A = []
for i in range(H):
    Ai = []
    Ai_raw = input().split()
    for j in range(W):
        Ai.append(int(Ai_raw[j]))
    A.extend(Ai)

Q = int(input())
L = []
R = []
for i in range(Q):
    LRi_raw = input().split()
    L.append(int(LRi_raw[0]))
    R.append(int(LRi_raw[1]))

#### 入力フェーズここまで ####
#### 計算フェーズここから ####

# 各移動で踏むA_ijとそのx,yの値にindexベースで参照できるように
# A_ijの値でindexをソートしておく
x_ = np.arange(W)
x = np.tile(x_, H)
y_ = np.arange(H)
y = np.repeat(y_, W)
# A_ijの値でsortした時のindexの順番を取得
B = np.argsort(A)

for q in range(Q):
    # 各実技試験につき
    score = 0
    Li = L[q]
    Ri = R[q]
    M = int((Ri - Li) / D) # 何回移動が必要か
    m_vec = [Li + D * m for m in range(M+1)] # 通るA_ijの値

    for m in range(M):
        # 各移動につき
        id_from = B[m_vec[m] - 1]
        id_to = B[m_vec[m+1]- 1]
        score += np.abs(x[id_from] - x[id_to]) + np.abs(y[id_from] - y[id_to])

    print(score)


### FIXED CODE ###

N = input()
m = int(int(N)/3)
print(m)
data = int(input().split())
a = data[0]
b = data[1]
print(a * b, end = " ")
print(a* 2 + b * 2, end = "\n")

### FIXED CODE ###

data = input().split()
a = int(data[0])
b = int(data[1])
print(a * b, end = " ")
print(a *2 + b * 2, end = "\n")
import sys

def isEmpty(S):
  if len(S) == 0:
    return True

def isFull(S):
  if len(S) >= 100000:
    return True

def enqueue(x):
  if isFull(x_list_list):
    print 'Error'
  x_list_list.append(x)

def dequeue(x_list_list):
  if isEmpty(x_list_list):
    print 'Error'
  del_list = x_list_list[0]
  x_list_list.pop(0)
  return(del_list)

y = sys.stdin.readline()
a, b = y.split(" ")
a = int(a)
b = int(b)

S = []
x_list_list = []

for i in range(a):
  text = raw_input()
  x_list = text.split()
  x_list[1] = int(x_list[1])
  x_list.append(0)
  x_list_list.append(x_list)

flag = a
while flag != 0:
  if int(x_list_list[0][1]) > b:
    x_list_list[0][1] -= int(b)
    for j in range(flag):
      x_list_list[j][2] += b
    del_list = dequeue(x_list_list)
    enqueue(del_list)
  elif int(x_list[0][1]) <= b:
    for j in range(flag):
      x_list_list[j][2] += x_list_list[0][1]
    x_list_list[0][1] = 0
    flag -= 1
    print x_list_list[0][0],x_list_list[0][2]
    dequeue(x_list_list)
    

### FIXED CODE ###

import sys

def isEmpty(S):
  if len(S) == 0:
    return True

def isFull(S):
  if len(S) >= 100000:
    return True

def enqueue(x):
  if isFull(x_list_list):
    print 'Error'
  x_list_list.append(x)

def dequeue(x_list_list):
  if isEmpty(x_list_list):
    print 'Error'
  del_list = x_list_list[0]
  x_list_list.pop(0)
  return(del_list)

y = sys.stdin.readline()
a, b = y.split(" ")
a = int(a)
b = int(b)

S = []
x_list_list = []
run_time = 0

for i in range(a):
  text = raw_input()
  x_list = text.split()
  x_list[1] = int(x_list[1])
  x_list.append(0)
  x_list_list.append(x_list)

flag = a
while flag != 0:
  if x_list_list[0][1] > b:
    x_list_list[0][1] -= int(b)
    run_time += b
    del_list = dequeue(x_list_list)
    enqueue(del_list)
  else:
    run_time += x_list_list[0][1]
    x_list_list[0][2] = run_time
    x_list_list[0][1] = 0
    flag -= 1
    print x_list_list[0][0],x_list_list[0][2]
    dequeue(x_list_list)
x = list(map(int, input().split()))
for i in range(5):
  if x[i] != i+1
  	print(i+1)


### FIXED CODE ###

x = list(map(int, input().split()))
for i in range(5):
  if x[i] != i+1:
    print(i+1)
N,M = map(int, input().split())
from collections import defaultdict
edges = defaultdict(list)
for i in range(M):
    a, b = map(int, input().split())
    edges[a].append(b)
    edges[b].append(a)

first = edges[1]
# print(first)
for fr in first:
    if N in edges[fr]:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")N,M = map(int, input().split())
from collections import defaultdict
edges = defaultdict(list)
for i in range(M):
    a, b = map(int, input().split())
    edges[a].append(b)
    edges[b].append(a)

first = edges[1]
# print(first)
for fr in first:
    if N in edges[fr]:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")

### FIXED CODE ###

N,M = map(int, input().split())
from collections import defaultdict
edges = defaultdict(list)
for i in range(M):
    a, b = map(int, input().split())
    edges[a].append(b)
    edges[b].append(a)

first = edges[1]
# print(first)
for fr in first:
    if N in edges[fr]:
        print("POSSIBLE")
        exit()
print("IMPOSSIBLE")
import numpy as np

def main():
  N = int(input())
  A = np.asarray(list(map(int, input().split())), dtype=np.float32)
  r = 1
  cnt = 1
  T = A[0]
  t = 1
  flg = False
  for l in range(N):
    while True:
      if int(T) ^ int(A[r]) == T + A[r]:
        t += 1
        cnt += t
        T += A[r]
        r += 1
      else:
        T -= A[l]
        t -= 1
        break
      if r == N:
        flg = True
        break
    if flg:
      break
  print(cnt)  

main()


### FIXED CODE ###

N = int(input())
A = tuple(map(int, input().split()))
if len(A) == 1:
  print(1)
  exit()
r = 1
cnt = 1
T = A[0]
t = 1
flg = False
for l in range(N):
  while True:
    if T ^ A[r] == T + A[r]:
      t += 1
      cnt += t
      T += A[r]
      r += 1
    else:
      T -= A[l]
      t -= 1
      break
    if r == N:
      flg = True
      break
  if flg:
    break
print(cnt)
N,M,L = map(int, input().split())
A = [0]*M
B = [0]*M
C = [0]*M
for i in range(M):
    A[i], B[i], C[i] = map(int, input().split())
    
Q = int(input())
qlist = [[int(q) for q in input().split()] for _ in range(Q)]

INF = 10**15
G = [[INF for _ in range(N+1)] for _ in range(N+1)]
for i in range(M):
    if C[i] <= L:
        G[A[i]][B[i]] = C[i]
        G[B[i]][A[i]] = C[i]
        

        
def dijkstra(s,t,n,w,cost,L):
    #始点sから各頂点への最短距離
    #n:頂点数,　w:辺の数, cost[u][v] : 辺uvのコスト(存在しないときはinf)
    d = [INF] * n
    used = [False] * n
    d[s] = 0
    c = [INF]*n
    c[s] = 0
    
    while True:
        v = -1
        #まだ使われてない頂点の中から最小の距離のものを探す
        for i in range(n):
            if (not used[i]) and (v == -1):
                v = i
            elif (not used[i]) and c[i] < c[v]:
                v = i
        if v == -1:
               break
        used[v] = True
               
        for j in range(n):
            t = c[v]+((d[v]-c[v]*L)+cost[v+1][j+1])
            if (c[v]+((d[v]-c[v]*L)+cost[v+1][j+1]))%L == 0:
                f = t//L -1
            c[j] = min(c[j], min(c[v]+((d[v]-c[v]*L)+cost[v+1][j+1])//L,f))
            if c[j] > min(c[v]+((d[v]-c[v]*L)+cost[v+1][j+1])//L,f):
                d[j] = d[v] + cost[v+1][j+1]
            elif c[j] == min(c[v]+((d[v]-c[v]*L)+cost[v+1][j+1])//L,f):
                d[j] = min(d[j], d[v] + cost[v+1][j+1])
    print(c)
    return c[t]


for i in range(Q):
    ans = dijkstra(qlist[i][0]-1,qlist[i][1]-1,N,M,G,L)
    if ans == INF:
        print(-1)
    else:
        print(ans)

### FIXED CODE ###

N,M,L = map(int, input().split())
A = [0]*M
B = [0]*M
C = [0]*M
for i in range(M):
    A[i], B[i], C[i] = map(int, input().split())
    
Q = int(input())
qlist = [[int(q) for q in input().split()] for _ in range(Q)]

INF = 10**18
d = [[INF]*N for _ in range(N)]
for i in range(M):
    d[A[i]-1][B[i]-1] = C[i]
    d[B[i]-1][A[i]-1] = C[i]

for i in range(N):
    d[i][i] = 0
        

# Warshall-Floyd法
# DP
for k in range(N):
    for i in range(N):
        for j in range(N):
            d[i][j] = min(d[i][j], d[i][k]+d[k][j])

d2 = [[INF]*N for _ in range(N)]
for i in range(N):
    for j in range(N):
        if i == j:
            d2[i][j] = 0
        elif d[i][j] <= L:
            d2[i][j] = 1
            
for k in range(N):
    for i in range(N):
        for j in range(N):
            d2[i][j] = min(d2[i][j], d2[i][k]+d2[k][j])
                
for i in range(Q):
    s = qlist[i][0]-1
    t = qlist[i][1]-1
    ans = d2[s][t]
    if ans >= INF:
        print(-1)
    else:
        print(ans-1)
nm = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]

n = nm[0]
m = nm[1]

a_s = sorted(a)[::-1]
if a_s[m-1] < sum(a)/(4*m):
  print('No')
else:
  print('Yes')vv

### FIXED CODE ###

nm = [int(i) for i in input().split()]
a = [int(i) for i in input().split()]

n = nm[0]
m = nm[1]

a_s = sorted(a)[::-1]
if a_s[m-1] < sum(a)/(4*m):
  print('No')
else:
  print('Yes')
import numpy as np
N, M = map(int,input().split())
A = list(map(int,input().split()))
A = np.array(A)
for _ in range(M):
    B, C = map(int,input().split())
    if A[B - 1] <= C:
        A[:B] = [C] * B
         A.sort()
    else:
        A = np.maximum(A, C)
print(np.sum(A))

### FIXED CODE ###

N, M = map(int,input().split())
A = list(map(int,input().split()))
A.sort()
BC = [list(map(int,input().split())) for _ in range(M)]
BC.sort(key=lambda x: x[1], reverse=True)
j = 0
for i in range(N):
    if A[i] >= BC[j][1]:
        break
    else:
        A[i] = BC[j][1]
        BC[j][0] -= 1
        if BC[j][0] == 0:
            j += 1
        if j >= M:
            break
print(sum(A))
N = int(input())
A = [list(map(str, input().split())) for i in range(N)]
S = input()
i = 0
while A[i][0] != S:
  i += 1
print(sum(int(A[j][1]) for j in range(i + 1, N))

### FIXED CODE ###

N = int(input())
A = [list(map(str, input().split())) for i in range(N)]
S = input()
i = 0
while A[i][0] != S:
  i += 1
print(sum(int(A[j][1]) for j in range(i + 1, N)))
N = int(input())
l = [list(map(int,input().split())) for _ in range(N)]
for i in range(101):
    for j in range(101):
        H = set()
        for k in range(len(l)):
            x = l[k]
            h = abs(i - x[0]) + abs(j - x[1]) + x[2]
            if h >= 1:
              H.add(h)
       
        if len(H) == 1:
          for x in H:
            h = x
          for k in range(len(l)):
            x = l[k]
            f = 1
            f *= x[3] == max(0,h - abs(i - x[0]) - abs(j - x[1]))
        if f == 1:
          print(i,j,h)

### FIXED CODE ###

N = int(input())
L = []
M = []
for _ in range(N):
    l = list(map(int,input().split()))
    if l[2] != 0:
        L.append(l)
    else:
        M.append(l)

for i in range(101):
    for j in range(101):
        tmp = -1
        for x in L:
            H = abs(x[0]-i) + abs(x[1]-j) + x[2]
            if H < 1:
                break
            if tmp != -1 and tmp != H:
                break
            else:
                tmp = H
        else:
            for x in L:
                if x[2]==max(0,H-abs(x[0]-i)-abs(x[1]-j)):
                    pass
                else:
                    break
            else:
                for x in M:
                    if x[2]==max(0,H-abs(x[0]-i)-abs(x[1]-j)):
                        pass
                    else:
                        break
                else:
                    print(i,j,H)
import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: map(str, sys.stdin.buffer.readline().split())
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n, m = rm()
l = 0
r = inf
for _ in range():
  a, b = rm()
  a = max(a, l)
  b = min(b, inf)
print(b-a+1)



### FIXED CODE ###

import sys
import math
import itertools
import collections
import heapq
import re
import numpy as np

rr = lambda: sys.stdin.readline().rstrip()
rs = lambda: map(str, sys.stdin.buffer.readline().split())
ri = lambda: int(sys.stdin.readline())
rm = lambda: map(int, sys.stdin.buffer.readline().split())
rl = lambda: list(map(int, sys.stdin.readline().split()))
inf = float('inf')
mod = 10**9 + 7

n, m = rm()
l = 0
r = inf
for _ in range(m):
  a, b = rm()
  l = max(a, l)
  r = min(b, r)
c = r-l+1
if c >= 1:
  print(c)
else:
  print(0)
from collections import Counter
N=int(input())
a=list(map(int, input().split()))
h = w = 0
 
for i, cnt in Counter(a).items:
    if cnt >= 2 and i > w:
        if i > h:
            if cnt >= 4:
                h = i
                w = i
            else:
                w = h
                h = i
        else:
            w = i
            
print(w * h)

### FIXED CODE ###

from collections import Counter
 
N = int(input())
A = list(map(int, input().split()))
h = w = 0
 
for i, cnt in Counter(A).items():
    if cnt >= 2 and i > w:
        if i > h:
            if cnt >= 4:
                h = i
                w = i
            else:
                w = h
                h = i
        else:
            w = i
            
print(w * h)
n=int(input())
lst=list(map(int,input().split()))
ans=0
for i in range(0,n+1):
 if (i+1)%2==0:
    pass
 elif lst[i]%2!=0:
    ans+=1
 else:
  pass
print(ans)

### FIXED CODE ###

n=int(input())
lst=list(map(int,input().split()))
ans=0
for i in range(0,n):
 if (i+1)%2==0:
    pass
 elif lst[i]%2!=0:
    ans+=1
 else:
  pass
print(ans)
N = int(input())
X_double = N / 1.08
if (X_double % 1) == 0:
  print(int(X_duoble))
else:
  X_ceil = ceil(X_double)
  if floor(X_ceil * 1.08) == N:
    print(X_ceil)
  else:
    print(':(')
  
    

### FIXED CODE ###

import math

N = int(input())
X_double = N / 1.08
if (X_double % 1) == 0:
  print(int(X_double))
else:
  X_ceil = math.ceil(X_double)
  if math.floor(X_ceil * 1.08) == N:
    print(X_ceil)
  else:
    print(':(')
a = list(map(int,input().split()))
n = 0
for i in range(1,N+1):
    for j in range(N+1-i):
        S = 0
        for x in a[j:j+i]:
            S += x
        if S == 0:
            n += 1
print(n)

### FIXED CODE ###

N = int(input())
a = list(map(int,input().split()))
s = [0]*(len(a)+1)
for i in range(len(a)):
    s[i+1] = s[i] + a[i]
b = {}
for x in s:
    if str(x) not in b:
        b[str(x)] = 1
    else:
        b[str(x)] += 1
n = 0
for x in b:
    n += b[x]*(b[x]-1)/2
print(int(n))
n=int(input())

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

needsearch=[]

for i in range(n):
    a[i]-=(i+1)
    needsearch.append(-2*(i+1)-a[i])

counter=[0]*(2*(10**5))

for i in range(n):
    if 0<a[i]+10**5<2*(10**5):
        counter[a[i]+10**5]+=1

ans = 0
for i in range(len(needsearch)):
    if 0<needsearch[i]+10**5<2*(10**5):
        ans += counter[needsearch[i]+10**5]
    counter[a[i]+10**5]-=1


print(ans)


### FIXED CODE ###

n=int(input())

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

needsearch=[]

for i in range(n):
    a[i]-=(i+1)
    needsearch.append(-2*(i+1)-a[i])

counter=[0]*(2*(10**6))

for i in range(n):
    if 0<a[i]+10**6<2*(10**6):
        counter[a[i]+10**6]+=1

ans = 0
for i in range(len(needsearch)):
    if 0<needsearch[i]+10**6<2*(10**6):
        ans += counter[needsearch[i]+10**6]
    if 0<a[i]+10**6<2*(10**6):
        counter[a[i]+10**6]-=1


print(ans)
N = int(input())
A = list(map(int, input().split()))
s = 1
for i in range(N):
    s *= A[i]
    i += 1
if s > 10**18:
    print(-1)
else:
    print(s)

### FIXED CODE ###

a, b = map(int, input().split())
print(a * b)
def count_section_by_zero(data):
  count = 0
  flg = False
  start = 0
  for i, d in enumerate(data):
    if flg is False and d != 0:
      count += 1
      flg = True
      
    if d == 0:
      flg = False
  return count

def input_list():
  return list(map(int, input().split()))

def input_list_str():
  return list(map(str, input().split()))

def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

def gcd(*numbers):
    return reduce(fractions.gcd, numbers)

def gcd_list(numbers):
    return reduce(fractions.gcd, numbers)

def combinations_count(n, r):
    return math.factorial(n) // (math.factorial(n - r) * math.factorial(r))

# 2で割り切れる回数
def divide_two(arg):
  c = 0
  while True:
    if c >= 2:
      break
    if arg % 2 != 0:
      break
    arg //= 2
    c += 1
  return c

# 素因数分解
def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a

def main():
  n, q = input_list()
  s = input()
  ss = list(s)
  ac_count = s.count('AC')
  index = 1
  for i in range(n):
    if s[i]=='A' and s[i+1]=='C':
      ss[i] = 1
    else:
      ss[i] = 0
  for qi in range(q):
    l, r = input_list()
    x = ss[l-1:r-1]
    print(x.count(1))
  
import math
import fractions
import collections
import itertools
from functools import reduce
main()

### FIXED CODE ###

N, Q = map(int, input().split())
S = input()
tmp = [0] * (N+1)

for i in range(N):
  w = 1 if S[i:i+2] == 'AC' else 0
  tmp[i+1] = tmp[i] + w
  
for _ in range(Q):
  l, r = map(int, input().split())
  print(tmp[r-1] - tmp[l-1])
a = list(map(int,input().split()))
 
 
one = a[0]
zero = a[1]
mone = a[2]
num = a[3]
 
ans = 0
if one >= num:
    print(num)
else:
    ans += one
    num -= one
    if zero >= num:
        print(ans)
    else:
        num -= zero
        print(one - num)

### FIXED CODE ###

a = input()
b = input()

a_len = len(a)
b_r = b[:-1]

if b_r == a and a_len <= 10 and a_len >= 1:
 	print("Yes")
else:
	print("No")
n = int(raw_input())
a = map(raw_input().split())

a.sort()

print (" ".join(map(str, a)))

### FIXED CODE ###

n = int(raw_input())
a = map(int, raw_input().split())

a.sort()

print (" ".join(map(str, a)))
mod = 1000000007
H, W, A, B = map(int, raw_input().split())

factorial = [1]
for n in range(1, H+W):
    factorial.append(factorial[n-1]*n%mod)

def power(x, y):
    if   y == 0     : return 1
    elif y == 1     : return x % mod
    elif y % 2 == 0 : return power(x, y/2)**2 % mod
    else            : return power(x, y/2)**2 * x % mod

inverseFactorial = [0] * (H+W)
inverseFactorial[H+W-1] = power(factorial[H+W-1], mod-2)
for n in range(H+W-2, -1, -1):
    inverseFactorial[n] = inverseFactorial[n+1] * (n+1) % mod

def combi(n, m):
    return factorial[n] * inverseFactorial[m] * inverseFactorial[n-m] % mod

sum = 0
for i in range(B+1, W+1):
    sum = (sum + combi(H-A-1+i-1, i-1) * combi(A-1+W-i, W-i)) % mod
print (sum)

### FIXED CODE ###

mod = 1000000007
H, W, A, B = map(int, input().split())
import sys
sys.setrecursionlimit(10000)
factorial = [1]
for n in range(1, H+W):
    factorial.append(factorial[n-1]*n % mod)

def power(x, y):
    if y == 0:
        return 1
    elif y == 1:
        return x % mod
    elif y % 2 == 0:
        return (power(x, y//2)**2) % mod
    else:
        return (power(x, y//2)**2 * x) % mod
inverseFactorial = [0 for i in range(H+W)]
inverseFactorial[H+W-1] = power(factorial[H+W-1], mod-2)
for n in range(H+W-2, -1, -1):
    inverseFactorial[n] = (inverseFactorial[n+1] * (n+1) )% mod

def combi(n, m):
    return (factorial[n] * inverseFactorial[m] * inverseFactorial[n-m] )% mod
 
sum = 0
for i in range(B+1, W+1):
    sum = (sum + combi(H-A-1+i-1, i-1) * combi(A-1+W-i, W-i)) % mod
print(sum)
count = int(input())
array = [int(i) for i in input().split(" ")]

a = array.reverse()
print(" ".join(a))

### FIXED CODE ###

count = int(input())
array = [int(i) for i in input().split(" ")]

for n in range( count - 1, 0, -1):
    print(array[n], end = " ")
print(array[0])
s1, s2, s3 = input().split()

ans = s1[0].upper()+s1[1].upper()+s1[2].upper()
print(ans)

### FIXED CODE ###

s1, s2, s3 = input().split()

ans = s1[0].upper() + s2[0].upper() + s3[0].upper()
print(ans)
#coding:utf-8
import numpy as np
import collections
N = 1000000
ls = list(map(int,input().split()))
ls.append(N)
ls.append(N)
array = np.array(ls).reshape(-1,2).T
c_even = collections.Counter(array[0])
c_odd = collections.Counter(array[1])
if len(set(ls))==2:
    print (int((len(ls)-2)/2))
elif c_even.most_common()[0][0] != c_odd.most_common()[0][0]:
    print (len(ls)-c_even.most_common()[0][1]-c_odd.most_common()[0][1]-2)
else:
    print (min(len(ls)-c_even.most_common()[0][1]-c_odd.most_common()[1][1]-2,len(ls)-c_even.most_common()[1][1]-c_odd.most_common()[0][1]-2))


### FIXED CODE ###

#coding:utf-8
import numpy as np
import collections
N = 1000000
_ = int(input())
ls = list(map(int,input().split()))
ls.append(N)
ls.append(N)
array = np.array(ls).reshape(-1,2).T
c_even = collections.Counter(array[0])
c_odd = collections.Counter(array[1])
if len(set(ls))==2:
    print (int((len(ls)-2)/2))
elif c_even.most_common()[0][0] != c_odd.most_common()[0][0]:
    print (len(ls)-c_even.most_common()[0][1]-c_odd.most_common()[0][1]-2)
else:
    print (min(len(ls)-c_even.most_common()[0][1]-c_odd.most_common()[1][1]-2,len(ls)-c_even.most_common()[1][1]-c_odd.most_common()[0][1]-2))
A, B = map(int, input()split())
     
print(A* B)

### FIXED CODE ###

A, B = map(int, input().split())
     
print(A* B)
A, B = map(int, imput().split())

if B % A == 0:
  print(A+B)
else:
  print(B-A)

### FIXED CODE ###

A, B = map(int, input().split())

if B % A == 0:
  print(A+B)
else:
  print(B-A)
data = []
res = []

data = [int(input()) for _n in range(int(input()))]

for n in range(i):
	res.append(max(data[0:n]+data[n+1:]))

for item in res:
	print(item)



### FIXED CODE ###

import copy

data = []
i = int(input())

data = [int(input()) for _n in range(i)]
maxInt = max(data)
data2 = copy.copy(data)
data2.remove(maxInt)
max2Int = max(data2)
for n in range(i):
	if maxInt != data[n]:
		print(maxInt)
	else:
		print(max2Int)
s = input()
s = int(s)

x = s / 1.08

rx = round(x)
tashikame = rx * 1.08
tashikames = math.floor(tashikame)
tashikames = int(tashikames)
if s != tashikames:
  print(':(')
else:
  x = int(x)
  print(x)

### FIXED CODE ###

import math

s = int(input())

te = s % 1.08
if te < 0.1:
  print(':(')
else:
  x = s / 1.08
  print(math.ceil(x))
import math

r = int(input())

s = "{0:.6f}".format(r*r*math.pi)
l = "{0:.6f}".format(2*r*math.pi)

print(str(s) + " " + str(l))

### FIXED CODE ###

r = float(input())

s = r * r * 3.14159265358979
l = 2 * r * 3.14159265358979
 
print(s, end = " ")
print(l)
n,m =map(int,input().split())
if n <m:
    print(-1)
else:
    l= [11]*m
    for _ in range(m):
        s,c=map(int,input().split())
        if l[s-1] != str(c) and l[s-1] != 11:
            print(-1)
            exit(0)
        else:
            l[s-1] = str(c)
    for index,i in enumerate(l):
        if i == 11:
            l[index] = '0'
    if n>=2:
        if l[0] == '0' or l[0]==l[1]=='0':
            print(-1)
            exit(0)
    print(''.join(l))


### FIXED CODE ###

n,m =map(int,input().split())
l= [11]*n
for _ in range(m):
    s,c=map(int,input().split())
    if l[s-1] != str(c) and l[s-1] != 11:
        print(-1)
        exit()
    else:
        l[s-1] = str(c)
for index,i in enumerate(l):
    if i == 11:
        if n>1 and (index==0):
            l[index] = '1'
        else:
            l[index] = '0'
if n>=2:
    if l[0] == '0' or l[0]==l[1]=='0':
        print(-1)
        exit()
print(''.join(l))