Harryxun/stf_run huggingface dataset:
N = int(input())
A =[]
for i in range(N):
  A.append(int(input()))
m = max(A)
j = A.index(m)
for k in range(N):
  if k != j:
    print(m)
  else:
    B = A[:]
    del B[j]
    print(max(B))

### FIXED CODE ###

r = int(input())
print(3 * r * r)
import math

N = int(input())
ans = 0
for i in range(1, math.ceil(math.sqrt(N)) + 1):
    if N % i:
        continue
    n = N // i - 1
    if N % n == N // n:
        ans += n
print(ans)


### FIXED CODE ###

import math

N = int(input())
ans = 0
for i in range(1, math.ceil(math.sqrt(N)) + 1):
    if N % i:
        continue
    n = N // i - 1
    if n and N % n == N // n:
        ans += n
print(ans)
h,w = map(int,input().split())
a = list()

for i in range(h):
  a.append(list(map(int, input().split())))

h_blank = [False]*h
w_blank = [False]*w
for i in range(h):
  blank = True
  for j in range(w):
    if a[i][j] == '#':
      blank = False
      break
  if blank:
    h_blank[i] = True

for i in range(w):
  blank = True
  for j in range(h):
    if a[j][i] == '#':
      blank = False
      break
  if blank:
    w_blank[i] = True

for i in range(h):
  for j in range(w):
    if h_blank[i] or w_blank[j]:
      continue
    print(a[i][j])

### FIXED CODE ###

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

for i in range(h):
  a.append(input())

h_blank = [False]*h
w_blank = [False]*w
for i in range(h):
  blank = True
  for j in range(w):
    if a[i][j] == '#':
      blank = False
      break
  if blank:
    h_blank[i] = True

for i in range(w):
  blank = True
  for j in range(h):
    if a[j][i] == '#':
      blank = False
      break
  if blank:
    w_blank[i] = True

for i in range(h):
  if h_blank[i]:
    continue
  for j in range(w):
    if w_blank[j]:
      continue
    print(a[i][j], end='')
  print('')
import math
from functools import reduce

N = int(input())
t = [0] * N
A = [0] * N
total = []
for i in range(N):
    t[i], A[i] = map(int, input().split())
    total.append(t[i]+A[i])

def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)
def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

print(lcm_list(total))

### FIXED CODE ###

# 参考記録
N = int(input())
x, y = 1, 1
for i in range(N):
    a, b = map(int, input().split())
    # 前回の得票数+今回の得票数が今回のやつよりはるかに多い➡その倍数分あればいい？？
    mul = max((x+a-1)//a, (y+b-1)//b)
    x = mul*a
    y = mul*b
print(x+y)
# E - League
import sys
from collections import deque
from typing import Deque, List

readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readline


def main():
    N = int(readline())
    A: List[Deque[int]] = [deque()] + list(
        deque(map(int, line.split())) for line in readlines()
    )
    matched_games_cnt = 0
    next_games_opponent, last_games_day = [0] * (N + 1), [0] * (N + 1)
    queue = deque(list(range(1, N + 1)))
    while queue:
        player = queue.popleft()
        if not A[player]:  # The player has finished all games.
            continue
        opponent = A[player].popleft()

        # The opponent will have another game before playing against x.
        if next_games_opponent[opponent] != player:
            next_games_opponent[player] = opponent
            continue

        # The opponent's next game is against the player and vice versa.
        matched_games_cnt += 1
        last_games_day[player] = last_games_day[opponent] = (
            max(last_games_day[player], last_games_day[opponent]) + 1
        )
        # No next game is currently planned.
        next_games_opponent[player] = next_games_opponent[opponent] = 0
        queue.append(player), queue.append(opponent)

    print(max(last_games_day) if matched_games_cnt == N * (N - 1) // 2 else -1)


if __name__ == "__main__":
    main()


### FIXED CODE ###

# ABC139E - League
from collections import deque


def main():
    N, *A = map(int, open(0).read().split())
    B = {}
    for i in range(N):
        x = i * (N - 1)
        B[i + 1] = deque(A[x : x + N - 1])
    ans, cnt, matched = 0, 0, set()
    q = [i for i in range(1, N + 1)]
    while q:
        ans += 1
        next_q = []
        for i in q:
            if i in B and i not in matched:
                x = B[i][0]
                if x in B and x not in matched and B[x][0] == i:
                    B[i].popleft(), B[x].popleft()
                    matched |= {i, x}
                    cnt += 1
                    if not B[i]:
                        del B[i]
                    else:
                        next_q += [i]
                    if not B[x]:
                        del B[x]
                    else:
                        next_q += [x]
        q = next_q
        matched = set()
    flg = cnt == N * (N - 1) // 2
    print(ans if flg else -1)


if __name__ == "__main__":
    main()
def ct(pp, ls, xx, tct):
  tct[pp-1] += xx
  nodel = [i for i, x in enumerate(ls) if x == pp]
  if bool(nodel):
    for j in nodel:
      ct(j, ls, xx, tct)
  return
 
N, Q = map(int, input().split())
nodeR = [0 for nn in range(N)]
for i in range(N-1):
  a, b = map(int, input().split())
  nodeR[b-1] = a
tree_ct = [0 for nn in range(N)]
for j in range(Q):
  p, x = map(int, input().split())
  ct(p, nodeR, x, tree_ct)
print(' '.join(map(str, tree_ct)))

### FIXED CODE ###

import sys
stdin = sys.stdin
sys.setrecursionlimit(10**9)
 
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
 
 
n,q = na()
g = [[] for i in range(n)]
c = [0]*n
 
for i in range(n-1):
    a,b = na()
    g[a-1].append(b-1)
    g[b-1].append(a-1)
for i in range(q):
    p,x = na()
    c[p-1] += x
 
def f(b,a,r):
    r += c[a]
    c[a] = r
    for i in g[a]:
        if i != b:
            f(a,i,r)
 
f(-1,0,0)
print(' '.join([str(s) for s in c]))
n = int(input())
x = 0

whlie True:
  if n % 1000 == 0:
    break
   
  n += 1
  x += 1
  
print(x)


### FIXED CODE ###

n = int(input())
x = 0

while True:
    if n % 1000 == 0:
        break
    n += 1
    x += 1

print(x)
N = int(input())
A = list(map(int, input().split()))

A.sort()
result = 0
for i in range(N):
    for j in range(i):
        count += 1
        if A[i] % A[j] == 0:
            break
    else:
        result += 1
print(result)


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))

d = {}
for a in A:
    d.setdefault(a, 0)
    d[a] += 1

A = sorted(set(A))
t = [True] * (10 ** 6 + 1)

for a in A:
    for i in range(a + a, 10 ** 6 + 1, a):
        t[i] = False

for a in d:
    if d[a] > 1:
        t[a] = False

result = 0
for a in A:
    if t[a]:
        result += 1
print(result)
n = int(input())
s = str(input())
t = str(input())
i = 0
while t.find(s[i,n])>-1:



### FIXED CODE ###

n = int(input())
s = str(input())
t = str(input())
i = -1
while True:
   i += 1
   if t.find(s[i:n])>-1:
      print(int(n+i))
      break
r = int(input())
g = int(input())
b = int(input())
if(g*10+b % 4 == 0):
  print('YES')
else:
  print('NO')

### FIXED CODE ###

r,g,b = map(int,input().split())
if((g*10+b) % 4 == 0):
  print('YES')
else:
  print('NO')
n,t=map(int,input().split())
ab=[tuple(map(int,input().split())) for _ in range(n)]
ab.sort(key=lambda x:x[1],reverse=True)
ab.sort(key=lambda x:x[0])
ans=0
now=0
t-=0.5
x=0
while now<=t:
    ans+=ab[x][1]
    now+=ab[x][0]
    x+=1

ab.sort(key=lambda x:x[1],reverse=True)
ans2=0
now=0
t-=0.5
x=0
while now<=t:
    ans2+=ab[x][1]
    now+=ab[x][0]
    x+=1

print(max(ans,ans2))


### FIXED CODE ###

n,t=map(int,input().split())
ab=[tuple(map(int,input().split())) for _ in range(n)]
ab.sort(key=lambda x:x[0])
ab.insert(0,(0,0))
dp=[[0]*t for _ in range(n+1)]
for i in range(1,n+1):
    a,b=ab[i]
    if a<t:
        dp[i][a]=max(dp[i-1][a],b)
    for j in range(t):
        if dp[i-1][j]==0:
            continue
        if j+a<t:
            dp[i][j+a]=max(dp[i][j+a],dp[i-1][j]+b)
        dp[i][j]=max(dp[i-1][j],dp[i][j])
ans=0
p=[j for i,j in ab]
for i in range(1,n):
    ans=max(ans,max(dp[i])+max(p[i+1:]))
ans=max(ans,max(dp[n]))
print(ans)
import math
a,b=map(int,input().split())
b*=10
ans=0

for i in range(8):
    j=b
    j+=i 
   if math.floor(j*0.08)==a:
       ans=j
       break
if ans!=0:
    print(ans)
else :
    print(-1)


### FIXED CODE ###

import math
a,b=map(int,input().split())
b*=10
ans=0

for i in range(9):
    j=b
    j+=i 
    if int(j*0.08)==a:
        ans=j
        break
if ans!=0:
    print(ans)
else :
    print(-1)
#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1
sys.setrecursionlimit(10**10)

n,k=map(int,input().split())
G=[[] for i in range(n)]
for i in range(n-1):
    a,b=map(int,input().split())
    a-=1; b-=1
    G[a].append(b)
    G[b].append(a)

class InverseTable:
    __slots__ = ['In', 'fac', 'Ifac']

    def __init__(self, mod, maxnum):
        self.In = [0, 1]; self.fac = [1, 1]; self.Ifac = [1, 1]
        for i in range( 2, maxnum + 1 ):
            self.In.append( ( -self.In[mod % i] * (mod//i) ) % mod )
            self.fac.append( ( self.fac[-1] * i ) % mod )
            self.Ifac.append( (self.Ifac[-1] * self.In[-1]) % mod )
        
    def cmb(self, n, r):
        if ( r<0 or r>n ): return 0
        r = min(r, n-r)
        return self.fac[n] * self.Ifac[r] * self.Ifac[n-r] % mod

invt = InverseTable(mod, 2*10**5)
# maxnum=10**6だとテーブル生成に200ms程かかるので
# 最大生成領域は問題ごとに要検討

def dfs(s,node,parent):
    if len(G[node])-s==0: result=1
    else: result=(invt.fac[k-1-s]*invt.Ifac[k-1-s-(len(G[node])-s)])%mod
    for i ,di in enumerate(G[node]):
        if di == parent: continue
        result*=dfs(1,di,node); result%=mod
    # print(node,result)
    return result

print((k*dfs(0,0,-1))%mod)


    



### FIXED CODE ###

#!/usr/bin/env python3
import sys, math, itertools, collections, bisect
input = lambda: sys.stdin.buffer.readline().rstrip().decode('utf-8')
inf = float('inf') ;mod = 10**9+7
mans = inf ;ans = 0 ;count = 0 ;pro = 1
sys.setrecursionlimit(10**7)

n,k=map(int,input().split())
G=[[] for i in range(n)]
for i in range(n-1):
    a,b=map(int,input().split())
    a-=1; b-=1
    G[a].append(b)
    G[b].append(a)

class InverseTable:
    __slots__ = ['In', 'fac', 'Ifac']

    def __init__(self, mod, maxnum):
        self.In = [0, 1]; self.fac = [1, 1]; self.Ifac = [1, 1]
        for i in range( 2, maxnum + 1 ):
            self.In.append( ( -self.In[mod % i] * (mod//i) ) % mod )
            self.fac.append( ( self.fac[-1] * i ) % mod )
            self.Ifac.append( (self.Ifac[-1] * self.In[-1]) % mod )
        
    def cmb(self, n, r):
        if ( r<0 or r>n ): return 0
        r = min(r, n-r)
        return self.fac[n] * self.Ifac[r] * self.Ifac[n-r] % mod

invt = InverseTable(mod, 2*10**5)
# maxnum=10**6だとテーブル生成に200ms程かかるので
# 最大生成領域は問題ごとに要検討

def dfs(s,node,parent):
    if len(G[node])>=k: return 0
    elif len(G[node])-s==0: return 1
    else: result=(invt.fac[k-1-s]*invt.Ifac[k-1-s-(len(G[node])-s)])%mod
    for i ,di in enumerate(G[node]):
        if di == parent: continue
        result*=dfs(1,di,node); result%=mod
    # print(node,result)
    return result

print((k*dfs(0,0,-1))%mod)
N = int(input())
a = list(map(int,input().split()))
 
ans = []
for i in range(-100, 101):
    total = 0
    for ai in a:
        total += (ai - i)**2
    ans.append(total)
 
print(min(ans))

### FIXED CODE ###

N = int(input())
sumof = 0

for i in range(1, N+1):
    sumof += i
print(sumof)
def main():
    N = int(input())
    total = 0
    while N > 0:
        total += N % 10
        N = int(N / 10)
    if total % 9 == 0:
        print('Yes')
    else:
        print('No')
main()

### FIXED CODE ###

def main():
    N = input()
    total = 0
    for i in range(len(N)):
        total += int(N[i])
    if total % 9 == 0:
        print('Yes')
    else:
        print('No')
main()
a,b,c,d,e,k = map(int,open(0).read().split())
if max(e-a) <= k:
    print("Yay!")
else:
    print(":(")

### FIXED CODE ###

a,b,c,d,e,k = map(int,open(0).read().split())
if e-a <= k:
    print("Yay!")
else:
    print(":(")
N,W = map(int,input().split())
val = []
wei = []
for i in range(N):
    a,b = map(int,input().split())
    val.append(a)
    wei.append(b)

import numpy as np
#DPテーブル
dp = np.zeros((N+1,W+1))

#初期化
for j in range(W+1):
    dp[0][j] = 0

#DP計算
for i in range(N):
    for w in range(W+1):
        if(w >= wei[i]):
            dp[i+1][w] = max(dp[i][w - wei[i]] + val[i],dp[i][w])
        else:
            dp[i+1][w] = dp[i][w]

print(int(dp[N][W]))


### FIXED CODE ###

N,W = map(int,input().split())
val = []
wei = []
for i in range(N):
    a,b = map(int,input().split())
    val.append(a)
    wei.append(b)

dp = [[0 for j in range(W+1)] for i in range(N+1)]

#DP計算
for i in range(N):
    for w in range(W+1):
        if(w >= wei[i]):
            dp[i+1][w] = max(dp[i][w - wei[i]] + val[i],dp[i][w])
        else:
            dp[i+1][w] = dp[i][w]

print(int(dp[N][W]))
import random

ans = [random.randint(1,26) for i in range(D)]
print('\n'.join(map(str, ans)))

### FIXED CODE ###

import random

D = int(input())
c = list(map(int, input().split()))
s = [list(map(int, input().split())) for _ in range(D)]

out = [random.randint(1,26) for i in range(D)]

sat = 0
last = [0] * 26
for d in range(D):
    assert(1 <= out[d] and out[d] <= 26)
    j = out[d] - 1
    last[j] = d + 1
    for i in range(26):
        sat -= (d + 1 - last[i]) * c[i]
    sat += s[d][j]

for i in range(D):
    print(out[i])
#coding : utf8

number = input();
if(number < 1000):
    print('ABC');
else:
    print('ABD');


### FIXED CODE ###

line = input();

if(line < 1000):
    print('ABC');
else:
    print('ABD');
import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
N = int(input())
K = 10**5+1
P = [i for i in range(K)]

def par(a):
    if P[a] == a:
        return a
    t = par(P[a])
    P[a] = t
    return t
def cb(a, b):
    P[pa] = pb

X = [[] for _ in range(K)]
Y = [[] for _ in range(K)]
for _ in range(N):
    x, y = map(int, input().split())
    X[x-1].append(y-1)
    Y[y-1].append(x-1)
for i in range(K):
    for j in range(len(Y[i])-1):
        cb(Y[i][j], Y[i][j+1])

M = [[] for _ in range(K)]
for i in range(K):
    M[par(i)].append(i)
ans = -N
for i in range(K):
    S = []
    for j in M[i]:
        for k in X[j]:
            S.append(k)
    S = list(set(S))
    ans += len(S)*len(M[i])
print(ans)


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(1000000)
N = int(input())
K = 10**5+1
P = [i for i in range(K)]

def par(a):
    if P[a] == a:
        return a
    t = par(P[a])
    P[a] = t
    return t
def cb(a, b):
    pa = par(a)
    pb = par(b)
    if pa != pb:
        P[pa] = pb

X = [[] for _ in range(K)]
Y = [[] for _ in range(K)]
for _ in range(N):
    x, y = map(int, input().split())
    X[x-1].append(y-1)
    Y[y-1].append(x-1)
for i in range(K):
    for j in range(len(Y[i])-1):
        cb(Y[i][j], Y[i][j+1])

M = [[] for _ in range(K)]
for i in range(K):
    M[par(i)].append(i)
ans = -N
for i in range(K):
    S = []
    for j in M[i]:
        for k in X[j]:
            S.append(k)
    S = list(set(S))
    ans += len(S)*len(M[i])
print(ans)
import re
a, b = map(int, input().split())
s = input()
p1 = "\d{"+ str(a) +"}"
p2 = "\d{"+ str(b) +"}"
if s[a] == "-" and re.fullmatch(p1, s[0:a]) != None and re.fullmatch(p2, s[a+1:]) != None:
        print("Yes")
else:
        print("No")



### FIXED CODE ###

import re
a, b = map(int, input().split())
s = input()
p1 = r"\d{"+ str(a) +"}"
p2 = r"\d{"+ str(b) +"}"
if s[a] == "-" and re.fullmatch(p1, s[0:a]) != None and re.fullmatch(p2, s[a+1:]) != None:
        print("Yes")
else:
        print("No")
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[0]==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])
# (d1+d2)/2 == n1, (d2+d3)/2 == n2... が矛盾なくなるようにする
# にぶたんを使う

n = int(input())
dum = list(map(int, input().split()))
count = 0
l, r = 0, (10 ** 9 + 1000000) // 2

while True:
    mid = (l + r) // 2
    # print(l, r, mid)
    rain = [0 for _ in range(n)]
    rain[0] += mid * 2
    for i in range(1, n):
        next_amount = (dum[i - 1] - (rain[i - 1] // 2)) * 2
        rain[i] += next_amount
    print(rain)

    if dum[-1] == (rain[-1] + rain[0]) // 2:
        rain = list(map(str, rain))
        # print(" ".join(rain))
        exit()
    if (rain[0] + rain[-1]) // 2 < dum[-1]:
        # 最初に決めたやつが小さすぎた
        # print("{} は小さすぎた".format(rain[0]))
        l = mid + 1
    else:
        # 最初に決めたやつが大きすぎた
        # print("{} は大きすぎた".format(rain[0]))
        r = mid

    # セーフティネット 必要ないけど
    if count > 50:
        t = 5 / 0
        break
    count += 1

"""
7
110 50 53 50 11 36 88

11
38 7 15 15 9 31 23 1 5 55 81
"""


### FIXED CODE ###

# (d1+d2)/2 == n1, (d2+d3)/2 == n2... が矛盾なくなるようにする
# にぶたんを使う
# なんかしらんけど3問駄目だな...

n = int(input())
dum = list(map(int, input().split()))
count = 0
l, r = 0, (10 ** 10) // 2

while l < r:
    mid = (l + r) // 2
    # print(l, r, mid)
    rain = [0 for _ in range(n)]
    rain[0] += mid * 2
    for i in range(1, n):
        next_amount = (dum[i - 1] - (rain[i - 1] // 2)) * 2
        rain[i] += next_amount
    # print(rain)

    if dum[-1] == (rain[-1] + rain[0]) // 2:
        rain = list(map(str, rain))
        print(" ".join(rain))
        exit()
    if (rain[0] + rain[-1]) // 2 < dum[-1]:
        # 最初に決めたやつが小さすぎた
        # print("{} は小さすぎた".format(rain[0]))
        l = mid + 1
    else:
        # 最初に決めたやつが大きすぎた
        # print("{} は大きすぎた".format(rain[0]))
        r = mid

    # セーフティネット 必要ないけど
    if count > 50:
        t = 5 / 0
        break
    count += 1

"""
7
110 50 53 50 11 36 88

11
38 7 15 15 9 31 23 1 5 55 81
"""
n=int(input())
out=0
for i in (n):
  a,m=map(int,input().split())
  out+=m-a+1
print(out)


### FIXED CODE ###

n=int(input())
out=0
for i in range(n):
  a,m=map(int,input().split())
  out+=m-a+1
print(out)
A = input()
N = int(A)


if N ==1:
    a = 1
elif 1<=N and N<=100 and N%2 == 0:
    a = 0.5
    a = float(a)
elif 1<=N and N<=100 andN % 2 == 1:
    a = (N/2 + 1)/N

print(a)

### FIXED CODE ###

A = input()
N = int(A)


if N ==1:
    a = 1
elif N%2 == 0:
    a = 0.5
    a = float(a)
elif N%2 == 1:
    a = (N//2 + 1)/N

print(a)
s = str( input() )
check = [ x == set(s)[0] for x in list(s) ]
if len( set(s) ) == 2 and sum( check ) == 2 :
   print( "Yes" )
else : 
   print( "No" )


### FIXED CODE ###

s = list( str( input() ) )
check = [ x == s[0] for x in s ]
if len( set(s) ) == 2 and sum( check ) == 2 :
   print( "Yes" )
else : 
   print( "No" )
r,c=map(int,input().split())
tbl=[[0]*c for i in range(r+1)]
for i in range(r):
    tbl[i]=list(map(int,input().split()))
for i in range(c):
    for j in renge(r):
        tbl[r][i] +=tbl[j][i]
for i in rnage(r+1):
    m=0
    for j in range(c):
        m += tbl[i][j]
        print(tbl[i][j],end=" ")
    print(m)


### FIXED CODE ###

r,c=map(int,input().split())
tbl=[[0]*c for i in range(r+1)]
for i in range(r):
    tbl[i]=list(map(int,input().split()))
for i in range(c):
    for j in range(r):
        tbl[r][i] +=tbl[j][i]
for i in range(r+1):
    m=0
    for j in range(c):
        m += tbl[i][j]
        print(tbl[i][j],end=" ")
    print(m)
S = input()
T = input()
replaces = 0
for ch in range(S):
    if S[ch] == T[ch]:
    replaces += 1

print(replaces)


### FIXED CODE ###

S = input()
T = input()
replaces = 0
for ch in range(len(S)):
    if S[ch] != T[ch]:
        replaces += 1

print(replaces)
import os

def main():

    N,K = (int(x) for x in input().split())
    count = 0

    while(N > 0):
        N = N // K
 
        count += 1

    print(count)

if __name__ == "__main__":
    main()

### FIXED CODE ###

import os

def main():
    a=[int(x) for x in input().split()]
    if a[0] >= 10:
        print(a[1])
    else:
        num = 100*(10-a[0])
        print(num + a[1])

if __name__ == "__main__":
    main()
N = int(input())
lst = [int(input()) for i in range(N)]
if (N == 1):
    print('Hello World')
else:
    print(sum(lst))

### FIXED CODE ###

N = int(input())
if (N == 1):
  print('Hello World')
else:
  lst = [int(input()) for i in range(N)]
  print(sum(lst))
n=int(input())
if n[0]=<n[1] or (n[0]==n[1] and n[0]=<n[2]):
  print(str(n[0]+1)*3)
else:
  print(str(n[0])*3)

### FIXED CODE ###

n=list(map(int,input()))
if n[0]<n[1] or (n[0]==n[1] and n[0]<n[2]):
  print(str(n[0]+1)*3)
else:
  print(str(n[0])*3)
a , b= raw_input(). split()
S = a * b
O = 2 * a + 2 * b

print str(S) + ' ' +  str(O)

### FIXED CODE ###

a , b= map(int,raw_input(). split())
S = a * b
O = 2 * a + 2 * b

print str(S) + ' ' +  str(O)
n, k = list(map(int, input().split()))

s = input()

print(s[:k - 1] + s[k -1].lower + s[k:])


### FIXED CODE ###

n, k = map(int, input().split())
s=input()

print(s[:k-1]+s[k-1].lower()+s[k:])
n,m = map(int,input().split())
t = [[] for _ in range(n)]
for i in range(m):
    t_1,t_2 = map(int,input().split())
    t[t_1-1].append(t_2)

ans = ""
for i in t:
    if len(set(i)) == 1:
        ans += str(i[0])
    if not i:
        ans += "0"
if ans[0] == "0":
    print(-1)
else:
    print(ans)


### FIXED CODE ###

n,m = map(int,input().split())
t = [[] for _ in range(n)]
for i in range(m):
    t_1,t_2 = map(int,input().split())
    t[t_1-1].append(t_2)

ans = ""
for i in range(n):
    if len(set(t[i])) == 1:
        ans += str(t[i][0])
    elif not t[i]:
        if i == 0:
            if n == 1:
                ans += "0"
            else:    
                ans += "1"
        else:
            ans += "0"
    else:
        print(-1)
        exit()
if ans[0] == "0":
    if n == 1:
        print(0)
    else:
        print(-1)
else:
    print(ans)
n,q = map(int,input().split())
s=input()
LR=[]
for i in range(q):
    l,r = map(int,input().split())
    LR.append([l,r])

c=0
C=[]
for i in range(n):
    if s[i]=="A":
        p=1
    elif p==1 and s[i]=="C":
        c+=1
        p=0
    else:
        p=0
    C.append(c)

for i in range(q):
    l=LR[i][0]
    r=LR[i][1]
    ans = C[r-1]-C[l-1]
    print(ans)

### FIXED CODE ###

n,q = map(int,input().split())
s=input()
LR=[]
for i in range(q):
    l,r = map(int,input().split())
    LR.append([l,r])

c=0
p=0
C=[]
for i in range(len(s)):
    if s[i]=="A":
        p=1
    elif p==1 and s[i]=="C":
        c+=1
        p=0
    else:
        p=0
    C.append(c)

for i in range(q):
    l=LR[i][0]
    r=LR[i][1]
    ans = C[r-1]-C[l-1]
    print(ans)
a = list(input())
if len(set(a)) == 2:
  count = 0
  for r in set(a):
    if r.count(a) == 2:
      count += 1
  if count == 2:
    print("Yes")
  else:
    print("No")
else:
  print("No")

### FIXED CODE ###

a = list(input())
if len(set(a)) == 2:
  count = 0
  for r in set(a):
    if a.count(r) == 2:
      count += 1
  if count == 2:
    print("Yes")
  else:
    print("No")
else:
  print("No")
import numpy as np

n = int(input())

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

a.sort()

temp = np.sqrt(a[-1])

if a[0] != 1:
    a = np.array(a)

    i = 0

    while i < len(a):
        b = a / a[i]

        a = a[(b != b.astype(int)) | (b == 1)]

        i += 1

        if a[i] > temp:
            break

    u, counts = np.unique(a, return_counts=True)

    print(sum(counts == 1))

elif (len(a) > 1) and (a[0] == a[1]):
    print(0)
else:
    print(1)

### FIXED CODE ###

n = int(input())

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

a.sort()

dp = [True] * (a[-1] + 1)

ans = 0

m = a[-1]

for i, x in enumerate(a[:-1]):
    if not a[i+1] == x and dp[x]:
        ans += 1
    for b in range(x, m + 1, x):
        dp[b] = False

if dp[a[-1]]:
    ans += 1

print(ans)
s=int(input())
w=int(input())
if(s<=w):
    print("unsafe")
else:
    print("safe")

### FIXED CODE ###

s,w =map(int,input().split())
if(s<=w):
    print('unsafe')
if(s>w):
    print('safe')