Harryxun/stf_run huggingface dataset:
n = int(input())
ns= int(input().spit())
asum = sum(ns)
amin = min(ns)
amax = max(ns)

print(amin, amax, asum)


### FIXED CODE ###

n=int(input())
ns=input().split()
for i in range(len(ns)):
    ns[i]=int(ns[i])
asum=sum(ns)
amin=min(ns)
amax=max(ns)
print(amin,amax,asum)
while True:
  data = raw_input()

  if not data:
    break

  a,b,c,d,e,f = map(int, data.split())

  x = ( e*c - b*f ) / ( b*d - a*c )

  y = ( c - a*x ) / b

  print "%.3f %.3f" % ( round(x,3), round(y,3) )

### FIXED CODE ###


while True:
  try:
    data = raw_input()
  except EOFError:
    break

  a,b,c,d,e,f = map(float, data.split())

  x = ( b*f - e*c ) / ( b*d - a*e )

  y = ( c*d - a*f ) / ( b*d - a*e )

  if x == -0.0:
    x = 0

  if y == -0.0:
    y = 0

  print "%.3f %.3f" % ( round(x,3), round(y,3) )
s_17 = input()
# print(s_17)
s_17[3] = 8
print(*s_17)

### FIXED CODE ###

s_17 = list(input())
s_18 = ''

for s in range(len(s_17)):
    if (s == 3):
        s_18 += '8'
    else:
        s_18 += s_17[s]

print(s_18)
import numpy as np
(n,), *aaa = [list(map(int, s.split())) for s in open(0)]

aaa = np.array(aaa, dtype='int')

cost = np.stack([np.cumsum(aaa[0]), np.zeros(n, dtype='int')])
cost[1][0] = aaa[0][0] + aaa[1][0]

for i in range(1, n):
    cost[1][i] = max(cost[1][i-1], cost[0][i]) + aaa[1][i]

print(cost[-1][-1])

### FIXED CODE ###

import numpy as np
(n,), *aaa = [list(map(int, s.split())) for s in open(0)]

aaa = np.array(aaa, dtype='int')

cost = np.stack([np.cumsum(aaa[0]), np.zeros(n, dtype='int')])
cost[1][0] = aaa[0][0] + aaa[1][0]

for i in range(1, n):
    cost[1][i] = max(cost[1][i-1], cost[0][i]) + aaa[1][i]

print(cost[-1][-1])
S = int(input())
KL = [i for i in range(S)]
for i in range(1,S):
    for j in range(1,S):
        id = bisect.bisect_right(KL,i*j-S)
        if KL[id-1] == i*j-S:
            if [i,KL[id-1]] == [j,1]:
                continue
            else:
                print(0,0,i,KL[id-1],j,1)
                exit()

### FIXED CODE ###

S = int(input())
X2 = 10**9
Y2 = 1
X3 = (X2-(S%X2))%(10**9)
Y3 = (S+X3)//X2
print(0,0,X2,Y2,X3,Y3)
import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    n = I()
    d = collections.defaultdict(set)
    kk = None
    for _ in range(n-1):
        a,b = LI()
        kk = [a,b]
        d[a].add(b)
        d[b].add(a)

    if sum(kk) > 10**5*1.5:
        raise 't'

    f = collections.defaultdict(bool)
    rf = False
    def g(s, h, m):
        t = list(d[s] - set([m]))[-1]
        if len(d[t]) > 2:
            if h:
                if f[t]:
                    return True
                f[t] = True
            else:
                d[t].remove(s)
                d[s].remove(t)
                rf = True
            return False
        if len(d[t]) == 1:
            return not h
        return g(t,not h,s)

    tt = True
    gf = collections.defaultdict(bool)
    while tt:
        if rf:
            gf = collections.defaultdict(bool)
            f = collections.defaultdict(bool)
            rf = False
        tt = False
        for k,v in list(d.items()):
            if len(v) == 1:
                if gf[k]:
                    continue
                gf[k] = True
                res = g(k, True, -1)
                if res:
                    return 'First'
                tt = True
    return 'Second'


print(main())


### FIXED CODE ###

import math,string,itertools,fractions,heapq,collections,re,array,bisect,sys,random,time,copy,functools

sys.setrecursionlimit(10**7)
inf = 10**20
mod = 10**9 + 7

def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def I(): return int(sys.stdin.readline())
def F(): return float(sys.stdin.readline())
def S(): return input()


def main():
    n = I()
    d = collections.defaultdict(set)
    kk = None
    for _ in range(n-1):
        a,b = LI()
        kk = [a,b]
        d[a].add(b)
        d[b].add(a)

    tt = True
    gf = collections.defaultdict(bool)
    while tt:
        tt = False
        for k,v in list(d.items()):
            if len(v) == 1:
                vt = list(v)[0]
                if len(d[vt]) == 1:
                    continue
                for vv in d[vt]:
                    if vv == k:
                        continue
                    if vt in d[vv]:
                        d[vv].remove(vt)
                d[vt] = set([k])
                tt = True
            elif len(v) == 0:
                return 'First'
    return 'Second'


print(main())
n,m=map(int,input().split())
a=[0]*m
for i in range(m):
  a[i]=int(input())
temp=[0]*(n+1)
temp[0]=1
if a[i]==1:
  temp[1]=0
else:
  temp[1]=1
for i in range(2,n+1):
  if i in a:
    temp[i]=0
  else:
    temp[i]=temp[i-2]+temp[i-1]
    temp[i]=temp[i]%(10**9+7)
print(temp[n])

### FIXED CODE ###

n,m=map(int,input().split())
a=[0]*m
for i in range(m):
  a[i]=int(input())
a.append(0)
temp=[0]*(n+1)
temp[0]=1
if 1 in a:
  temp[1]=0
  j=1
else:
  temp[1]=1
  j=0
for i in range(2,n+1):
  if a[j]==i:
    temp[i]=0
    j=j+1
  else:
    temp[i]=temp[i-2]+temp[i-1]
    temp[i]=temp[i]%(10**9+7)
print(temp[n])
n,a=map(int,input().split())
x=list(map(int,input().split()))
dic={}
dic2=dic.copy()
for i in range(n):
  for j in dic:
    if j+x[i]-a in dic2:
      dic2[j+x[i]-a]+=dic[j]
    else:
      dic2[j+x[i]-a]=dic[j]
  if x[i]-a in dic:
    dic2[x[i]-a]+=1
  else:
    dic2[x[i]-a]=1
  dic=dic2.copy()
print(dic[0])

### FIXED CODE ###

n,a=map(int,input().split())
x=list(map(int,input().split()))
for i in range(n):
  x[i]-=a
dp=[]
for i in range(n+1):
  dp.append([])
  for i in range(6000):
    dp[-1].append(0)
dp[0][3000]=1
for i in range(n):
  for j in range(6000):
    if j+x[i]<6000 and j+x[i]>=0:
      dp[i+1][j+x[i]]+=dp[i][j]
      dp[i+1][j]+=dp[i][j]
print(dp[n][3000]-1)
a,b,c=map(int,input.split())

res='bust'
if a+b+c<=21:
  res='win'

print(res)

### FIXED CODE ###

a,b,c=map(int,input().split())
 
res='bust'
if a+b+c<=21:
  res='win'
 
print(res)
N,K,Q = map(int,input().split(' '))
A_i = list()
for k in range(Q):
    k = int(input())
    A_i.append(k)

First = [K-Q] * N

for i in A_i:
    First[i] += 1
for j in First:
    if j <= 0:
        print('No')
    else:
        print('Yes') 

### FIXED CODE ###

N,K,Q = map(int,input().split(' '))
A_i = list()
for k in range(Q):
    k = int(input())
    A_i.append(k)

First = [K-Q] * N

for i in A_i:
    First[i-1] += 1
for j in First:
    if j <= 0:
        print('No')
    else:
        print('Yes')
n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))

total_v = 0

for i in range(n-1)
	if v[i] - c[i] > 0:
    	total_v += v[i] - c[i]
print(total_v)


### FIXED CODE ###

n = int(input())
v = list(map(int,input().split()))
c = list(map(int,input().split()))

total_v = 0

for i in range(n):
  if v[i] - c[i] > 0:
    total_v += (v[i] - c[i])

print(total_v)
while 1:
  if x == 0 and y == 0:
    break
  else:
    if x > y:
      temp = x
      x = y
      y = temp
  print '{0} {1}'.format(x, y)

### FIXED CODE ###

while 1:
  x = map(int, raw_input().split())
  if x[0] == 0 and x[1] == 0:
    break
  x.sort()
  print "%d %d" % (x[0], x[1])
MOD = 998244353

N, K = map(int, input().split())
seg = [tuple(map(int, input().split())) for _ in range(K)]
dp = [0] * (N+1)
dp[0] = 1
for i in range(N):
    for s, t in seg:
        dp[i+s] += dp[i]
        dp[i+t;1] -= dp[i]
    dp[i+1] += dp[i]
    dp[i+1] %= MOD
    
print(dp[N-1])


### FIXED CODE ###

MOD = 998244353

N, K = map(int, input().split())
seg = [tuple(map(int, input().split())) for _ in range(K)]
dp = [0] * (N+1)
dp[0] = 1
for i in range(N):
    for s, t in seg:
        if (i+s) <= N:dp[i+s] += dp[i]
        if (i+t+1) <= N:dp[i+t+1] -= dp[i]
    dp[0] = 0
    dp[i+1] += dp[i]
    dp[i+1] %= MOD
    
print(dp[N-1])
a, b = map(int, input().split())
a = float(a)
b = float(b)
for i in range(-7000, 7000):
	if float(i) * 0.08 == a and float(i) * 0.1 == b:
		print(i)
		exit(0)
print(-1)


### FIXED CODE ###

a = input()
print('Yes' if 'A' in a and 'B' in a else 'No')
n,k = map(int, input().split())

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

city = 1
l2 = [1]
while True:
    city = l[city-1]
    if city in l2:
        break
    l2.append(city)
first = l2.index(city)
if len(l2) <= k:
    if city == l2[-1]:
        print(city)
    elif city == l2[city]:
        print(city)
    else:
        l2 = l2[first:]
        print(l2[(k-first)%(len(l2))])
else:
    print(l2[k])

### FIXED CODE ###

n,k = map(int, input().split())
l = [0]+list(map(int, input().split()))

journey = [1]

for i in range(2*n):
    next = l[journey[-1]]
    journey.append(next)
if k <= n+1:
    print(journey[k])
    exit()

end = n
start = n-1

while journey[start] != journey[end]:
    start -= 1

period = end - start
k %= period

while k < n:
    k += period

print(journey[k])
N,K=map(int,input().split())
A=list(map(int,input().split()))
flag=0
now=0
i=0
count=0
c=[0]*N
r=[0]
while flag==0:
  now=A[now]-1
  count+=1
  if count==K:
    flag=1
  elif c[now]==1:
    flag=2
  c[now]=1
  r.append(now)
print(r)
if flag==1:
  print(now+1)
else:
  o=[i for i, x in enumerate(r) if x == now]
  print(A[r[K%(o[1]-o[0])]+o[0]-1])

### FIXED CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
flag=0
now=0
i=0
count=0
c=[0]*N
r=[0]
c[0]=1
while flag==0:
  now=A[now]-1
  count+=1
  if count==K:
    flag=1
  elif c[now]==1:
    flag=2
  c[now]=1
  r.append(now)
if flag==1:
  print(now+1)
else:
  o=[i for i, x in enumerate(r) if x == now]
  print(r[(K-o[0])%(o[1]-o[0])+o[0]]+1)
import sys
sys.setrecursionlimit(100000)
char = list(input())
char_list_num = len(char)
count_list = [0] * char_list_num

def f(first_char,n,add_num):
    if first_char == char[n+add_num] and n + add_num != char_list_num - 1:
        return f(first_char,n+add_num,add_num)
    else:
        return n+add_num

num = 0
while not num == char_list_num - 1:
    reach_loop_num = f(char[num],num,1)
    diff = reach_loop_num - num
    if reach_loop_num == char_list_num - 1:
        diff += 1
    if char[num] == 'R':
        if diff % 2 == 0:
            count_list[reach_loop_num] += int(diff/2)
            count_list[reach_loop_num-1] += int(diff/2)
        else:
            count_list[reach_loop_num] += int(diff/2)
            count_list[reach_loop_num-1] += int(diff/2) +1
    else:
        if diff % 2 == 0:
            count_list[num] += int(diff/2)
            count_list[num-1] += int(diff/2)
        else:
            count_list[num] += int(diff/2) +1
            count_list[num-1] += int(diff/2)
    num = reach_loop_num
print(' '.join(map(str,count_list)))

### FIXED CODE ###

import sys
sys.setrecursionlimit(1000000000)
char = list(input())
char_list_num = len(char)
count_list = [0] * char_list_num

def f(first_char,n,add_num):
    if first_char == char[n+add_num] and n + add_num != char_list_num - 1:
        return f(first_char,n+add_num,add_num)
    else:
        return n+add_num

num = 0
while not num == char_list_num - 1:
    reach_loop_num = f(char[num],num,1)
    diff = reach_loop_num - num
    if reach_loop_num == char_list_num - 1:
        if char[num] == char[reach_loop_num]:
            diff += 1
        else:
            count_list[reach_loop_num] += 1
    if char[num] == 'R':
        if diff % 2 == 0:
            count_list[reach_loop_num] += int(diff/2)
            count_list[reach_loop_num-1] += int(diff/2)
        else:
            count_list[reach_loop_num] += int(diff/2)
            count_list[reach_loop_num-1] += int(diff/2) +1
    else:
        if diff % 2 == 0:
            count_list[num] += int(diff/2)
            count_list[num-1] += int(diff/2)
        else:
            count_list[num] += int(diff/2) +1
            count_list[num-1] += int(diff/2)
    num = reach_loop_num
print(' '.join(map(str,count_list)))
data = input().split()

seven = 0
five = 0

for i in range(data):
	if int(i) == 7:
		seven += 1
	elif int(i) == 5:
		five +=1

if seven == 1 and five == 2:
	print('YES')
else:
	print('NO')

### FIXED CODE ###

data = input().split()

seven = 0
five = 0

for i in range(len(data)):
	if int(data[i]) == 7:
		seven += 1
	elif int(data[i]) == 5:
		five +=1

if seven == 1 and five == 2:
	print('YES')
else:
	print('NO')
N,H = map(int,input().split())
AB = [[int(input().split())] for _ in range(N)]
A,B = zip(*AB)

a = max(A)
B = [b for b in B if b > a] #投げる
B.sort(reverse = True)

answer = 0
hp = H
attack_cnt = 0

for b in B:
  if hp <= 0:
    break
  attack_cnt += 1
  hp -= b

if hp > 0:
  attack_cnt += (hp-1)//a + 1

print(attack_cnt)


### FIXED CODE ###

N,H = map(int,input().split())
AB = [list(map(int,input().split())) for _ in range(N)]
A,B = zip(*AB)

a = max(A) #振る
B = [b for b in B if b > a] #投げる
B.sort(reverse = True)

answer = 0
hp = H
attack_cnt = 0

for b in B:
  if hp <= 0:
    break
  attack_cnt += 1
  hp -= b

if hp > 0:
  attack_cnt += (hp-1)//a + 1

print(attack_cnt)
n = int(input())
a = [int(input()) for i in range(n)]
A = [0]*100000
for i in a:
  if A[i] == 0:
    A[i] = 1
  else:
    A[i] = 0
print(A.count(1))

### FIXED CODE ###

n = int(input())
a = [int(input()) for i in range(n)]
wordcount = {}
for i in a:
  if i in wordcount:
    del wordcount[i]
  else:
    wordcount[i] = 1
print(len(wordcount))
#!/usr/bin/env python3
    import sys

    def make_divisors(n):
        divisors = []
        for i in range(1, int(n**0.5)+1):
            if n % i == 0:
                divisors.append(i)
                if i != n // i:
                    divisors.append(n//i)
        # divisors.sort()
        return divisors

    def lef(a, b):
        return a*a*a*a + a*a*a*b + a*a*b*b + a*b*b*b + b*b*b*b

    def solve(X: int):
        divs = make_divisors(X)
        for d in divs:
            base = 0
            upper = X // d
            while(lef(base+d,base) < upper):
                base+=1
            if lef(base+d,base) == upper:
                print(base+d,base)
                return

            base = -d//2-1
            while(lef(base+d,base) < upper) and (base > 0):
                base -= 1
            if lef(base+d, base) == upper:
                print(base+d, base)
                return

            base = -d
            while(lef(base+d,base) < upper) and (base < -d):
                base += 1
            if lef(base+d, base) == upper:
                print(base+d, base)
                return

            base = -d
            while(lef(base+d,base) < upper):
                base -= 1
            if lef(base+d, base) == upper:
                print(base+d, base)
                return
        raise
        return


    # Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
    def main():
        def iterate_tokens():
            for line in sys.stdin:
                for word in line.split():
                    yield word
        tokens = iterate_tokens()
        X = int(next(tokens))  # type: int
        solve(X)

    if __name__ == '__main__':
        main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys

def solve(X: int):

    for i in range(-150, 150):
        for j in range(-150, 150):
            if j**5 - i**5 == X:
                print(j, i)
                return
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    solve(X)

if __name__ == '__main__':
    main()
import collections

n = int(input())
s = raw_input()
cnt = 0
dictionary = {}

for i in range(n)[::-1]:
  if s[i] in dictionary.keys():
    dictionary[s[i]] += 1
  else:
    dictionary[s[i]] = 1
  ch = s[i:]
  tmp_cnt = 1
  for k,v in dictionary.items():
    if k != s[i]:
      tmp_cnt *= (v+1)
  cnt += tmp_cnt %(10**9+7)
print(cnt%(10**9+7))

### FIXED CODE ###

import collections

n = int(input())
s = input()
cnt = 0
dictionary = {}

for i in range(n)[::-1]:
  if s[i] in dictionary.keys():
    dictionary[s[i]] += 1
  else:
    dictionary[s[i]] = 1
  ch = s[i:]
  tmp_cnt = 1
  for k,v in dictionary.items():
    if k != s[i]:
      tmp_cnt *= (v+1)
  cnt += tmp_cnt % (10**9+7)
print(cnt % (10**9+7))
s = input()
x, y = map(int, input().split())
n = len(s)

D = [[], []]
st_x = 0
st_y = 0
st = 0
while st <= len(s)-1 and s[st] == "F":
    st_x += 1
    st += 1

di = 0
for i in range(st, n):
    if s[i] == "T":
        di = (di+1) % 2
        D[di].append(0)
    else:
        D[di][-1] += 1

# print(D)

mid = 10
ANS = [0, 0]
st_po = [st_x, st_y]
go_po = [x, y]
for i in range(2):
    DP = [[0] * (mid*2) for i in range(len(D[i]) + 1)]
    DP[0][st_po[i] + mid] = 1
    for j in range(len(D[i])):
        dd = D[i][j]
        for k in range(len(DP[0])):
            if 0 <= k-dd <= len(DP[0])-1 and 0 <= k+dd <= len(DP[0])-1:
                DP[j+1][k] = int(DP[j][k-dd] or DP[j][k+dd])

    ANS[i] = DP[-1][go_po[i]+mid]
    # print(DP)
# print(ANS)

print("Yes" if ANS[0] and ANS[1] else "No")

### FIXED CODE ###

s = input()
x, y = map(int, input().split())
n = len(s)

D = [[], []]
st_x = 0
st_y = 0
st = 0
while st <= len(s)-1 and s[st] == "F":
    x -= 1
    st += 1

di = 0
for i in range(st, n):
    if s[i] == "T":
        di = (di+1) % 2
        D[di].append(0)
    else:
        D[di][-1] += 1

# print(D)


ANS = [0, 0]
st_po = [0, 0]
go_po = [x, y]
for i in range(2):
    mid = sum(D[i]) + 5
    DP = [[0] * (mid*2) for i in range(len(D[i]) + 1)]
    DP[0][st_po[i] + mid] = 1
    for j in range(len(D[i])):
        dd = D[i][j]
        for k in range(len(DP[0])):
            aa = 0
            bb = 0
            if 0 <= k-dd <= len(DP[0])-1:
                aa = DP[j][k-dd]
            if 0 <= k+dd <= len(DP[0])-1:
                bb = DP[j][k+dd]

            DP[j+1][k] = int(aa or bb)

    if 0 <= go_po[i]+mid <= len(DP[0])-1:
        ANS[i] = DP[-1][go_po[i]+mid]
    # print("len",mid*2)
    #if i == 1:
        # print(DP[1][7999+mid])
# print(ANS)

print("Yes" if ANS[0] and ANS[1] else "No")
N = int(N)
P = [int(i) for i in input().split()]
ans = 0
for i in range(N-2):
  if max(P[i:i+3]) != P[i+1] and min(P[i:i+3]) != P[i+1]:
    ans += 1
print(ans)

### FIXED CODE ###

N = int(input())
P = [int(i)for i in input().split()]
cnt = 0
for n in range(1,N-1):
    if (P[n-1] < P[n] < P[n+1] or P[n-1] > P[n] > P[n+1]):
        cnt+=1
print(cnt)
A,B,C=map(int,input().split())
K=int(input())

print(A+B+C+max(A,B,C)*(2**K-1)

### FIXED CODE ###

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

print(A+B+C+max(A,B,C)*(2**K-1))
N = int(input())
ans = ""

while num > 0:
	N -= 1
	ans += chr(ord('a') + N % 26)
	N //= 26

print(ans)

### FIXED CODE ###

N = int(input())
ans = ""

while N > 0:
	N -= 1
	ans += chr(ord('a') + N % 26)
	N //= 26

print(ans[::-1])
def dfs(u,D):
    for v,w in tree[u]:
        if d[v]==-1:
            d[v]=(w+D)%2
            dfs(v,D+w)

N=int(input())
d=[-1 for _ in range(N)]
d[0]=0
tree=[[] for _ in range(N)]

for _ in range(N-1):
    u,v,w=map(int,input().split())
    u-=1
    v-=1
    tree[u].append([v,w])
    tree[v].append([u,w])

dfs(0,0)
for i in d:
    print(i%2)

### FIXED CODE ###

import sys

def dfs(u,D):
    sys.setrecursionlimit(10**6)
    for v,w in tree[u]:
        if d[v]==-1:
            d[v]=(D+w)%2
            dfs(v,D+w)

N=int(input())
d=[-1 for _ in range(N)]
d[0]=0
tree=[[] for _ in range(N)]

for _ in range(N-1):
    u,v,w=map(int,input().split())
    u-=1
    v-=1
    tree[u].append([v,w])
    tree[v].append([u,w])

dfs(0,0)
for i in d:
    print(i%2)
A, B, T map(int, input().split()) 
t_max = int((T+0.5)/A)
bis = 0
for t in range(t_max):
  bis += B*(t+1)
print(bis)

### FIXED CODE ###

A,B,T=map(int, input().split())
t_max = int((T+0.5)/A)
print(t_max*B)
print(input(),count("1")

### FIXED CODE ###

print(input().count('1'))
a = input()
b = input()
if a = b.reverse():
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a = input()
b = input()

if a == b[::-1]:
  print("YES")
else:
  print("NO")
import numpy as np
n, q = map(int, input().split())

e = np.eye(n+1, dtype=int)
for i in range(n-1):
    a, b = map(int, input().split())
    e[a][b] = 1

for i in reversed(range(1, n+1)):
    for j in range(1, i):
        if e[i-j][i] == 1:
            e[i-j][i+1:] += e[i][i+1:]
        else:
            continue


point = np.zeros(n, dtype=int)
for i in range(q):
    p, x = map(int, input().split())
    point[p-1] += x
print(e[1:, 1:])
ans = np.dot(point, e[1:, 1:])
print(*ans)

### FIXED CODE ###

from collections import deque
n, q = map(int, input().split())
tree = [[] for _ in range(n+1)]
cnt = [0] * (n+1)

for _ in range(n-1):
    a, b = map(int, input().split())
    tree[a].append(b)
    tree[b].append(a)

for _ in range(q):
    p, x = map(int, input().split())
    cnt[p] += x

queue = deque([1])
visited = {1}
while queue:
    now = queue.popleft()
    visited.add(now)
    for t in tree[now]:
        if t in visited:
            pass
        else:
            queue.append(t)
            cnt[t] += cnt[now]

print(*cnt[1:])
N, K = map(int, input().split())
S = str(input())
ans = ""
for i in range(0, K-1):
  ans += S[i]
ans += S[K].lower()
for j in range(K+1,N):
  ans += S[j]
print(ans)


### FIXED CODE ###

N, K = map(int, input().split())
S = str(input())
ans = ""
for i in range(N):
  if i == K-1:
    ans += S[i].lower()
  else:
    ans += S[i]
print(ans)
n=int(input())
g=[[] for i in range(n)]
for i in range(n-1):
    a,b,c=map(int,input().split())
    g[a-1].append([b-1,c])
    g[b-1].append([a-1,c])
q,k=map(int,input().split())
qu=[[k-1,0]]
v=[0]*n
d=[0]*n
while len(qu)>0:
    s=qu.pop(0)
    v[s[0]]=1
    for j in g[s]:
        if not v[j[0]]:
            v[j[0]]=1
            d[j[0]]=s[1]+j[1]
            qu.append([j[0],d[j[0]]])
for i in range(q):
    x,y=map(int,input().split())
    print(d[x-1]+d[y-1])


### FIXED CODE ###

from collections import deque
n=int(input())
g=[[] for i in range(n)]
for i in range(n-1):
    a,b,c=map(int,input().split())
    g[a-1].append([b-1,c])
    g[b-1].append([a-1,c])
q,k=map(int,input().split())
qu=deque([[k-1,0]])
v=[0]*n
d=[0]*n
while len(qu)>0:
    s=qu.popleft()
    v[s[0]]=1
    for j in g[s[0]]:
        if not v[j[0]]:
            v[j[0]]=1
            d[j[0]]=s[1]+j[1]
            qu+=[[j[0],d[j[0]]]]
for i in range(q):
    x,y=map(int,input().split())
    print(d[x-1]+d[y-1])
s=[]
x,n=map(int,input().split())
s=list(map(int,input().split()))
slist=sorted(s)

if n==0:
  print(x)
  exit()
for i in range(0,100):
  for j in range(n+1):
    if slist[j]==x-i:
        flag=1
    if slist[j]==x+i:
        flag=2
            
  if flag==2:
    flag=0
  elif flag==1:
    print(x+i)
    exit()
  elif flag==0:
    print(x-i)
    exit()

### FIXED CODE ###

s=[]
x,n=map(int,input().split())
if n==0:
  print(x)
  exit()
  
s=list(map(int,input().split()))
slist=sorted(s)
out=0
for i in range(0,1000):
  out=0
  for j in range(n):
    if slist[j]==x-i:
      out=1
  if out !=1:
   print(x-i)
   exit()
  out=0
  for k in range(n):
    if slist[k]==x+i:
      out=1
  if out !=1:
    print(x+i)
    exit()
a,b,c = list(map(str,input().split()))
a = a//c
b = b//c
print(b-a)

### FIXED CODE ###

l = list(map(str,input().split()))
v = ''
for i in range(len(l)):
    v = v + l[i][0]
print(v)