Harryxun/stf_run huggingface dataset:
a=input()
b=input()
s=[]
if len(a)==len(b):
    for i in range(len(a)):
        s.append(a[i])
        s.append(b[i])
else:
    for i in range(len(b)):
        s.append(a[i])
        s.append(b[i])
    s.append(a[-1])
print("".join(s))

### FIXED CODE ###

a,b,c = map(int,input().split())
if b-a == c-b:
    print("YES")
else:
    print("NO")
w, h, n = [int(i) for i in input().split()]
w2, h2 = w, h
wb, hb = [False] * w, [False] * h
for i in range(n):
    x, y, a = [int(i) for i in input().split()]
    if a == 1 and not wb[x]:
        w2 -= x
        wb[x] = True
    elif a == 2 and not wb[x]:
        w2 -= w - x
        wb[x] = True
    elif a == 3 and not hb[y]:
        h2 -= y
        hb[y] = True
    elif a == 4 and not hb[y]:
        h2 -= h - y
        hb[y] = True
ans = w2 * h2
print(ans if ans > 0 else 0)


### FIXED CODE ###

w, h, n = [int(i) for i in input().split()]
W = set(range(w))
H = set(range(h))
for i in range(n):
    x, y, a = [int(i) for i in input().split()]
    if a == 1:
        W &= set(range(x, w))
    elif a == 2:
        W &= set(range(0, x))
    elif a == 3:
        H &= set(range(y, h))
    elif a == 4:
        H &= set(range(0, y))
print(len(W) * len(H))
A=[int(input()) for  i in range(5)]
B=[int(str(A[i])[-1]) for i in range(5)]
if B==[0]*5:
	print(sum(A))
else:
	for i in range(5):
		if B[i]==0:
			B[i]=10
	ans=min(B)
	o=B.index(ans)
print((sum(A)-A[o])+10-(sum(A)-A[o])%10+A[o])

### FIXED CODE ###

A=[int(input()) for i in range(5)]
B=[10 if A[i]%10==0 else A[i]%10 for i in range(5)]
k=B.index(min(B))
C=[(A[i]-0.001)//10*10+10 for i in range(5)]
print(int(sum(C)-C[k]+A[k]))
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
xy = [LIST() for _ in range(N)]
xy.sort(key=lambda x:(x[0], x[1]))
# print(xy)
delta = defaultdict(int)
for i in range(N):
	for j in range(N):
		if i != j:
			delta[(xy[j][0]-xy[i][0], xy[j][1]-xy[i][1])] += 1
print(1+(N-1)-max(delta.values()))

### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, radians
from itertools import permutations, combinations, product, accumulate
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from fractions import gcd

def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(int, input().split()))
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

N = INT()
xy = [LIST() for _ in range(N)]
xy.sort(key=lambda x:(x[0], x[1]))
# print(xy)
delta = defaultdict(int)
if N == 1:
	print(1)
else:
	for i in range(N):
		for j in range(N):
			if i != j:
				delta[(xy[j][0]-xy[i][0], xy[j][1]-xy[i][1])] += 1
	print(1+(N-1)-max(delta.values()))
#ABC159.B
A = list(map(int,input().split()))
N = int(input())
b = list(map(int,input().split()))

for i in b:
    if i in A:
        A[A.index(i)]=0
if A[0]==0 and A[1]==0 and A[2]==0:
    print('Yes')
elif A[3]==0 and A[4]==0 and A[5]==0:
    print('Yes')
elif A[6]==0 and A[7]==0 and A[8]==0:
    print('Yes')

elif A[0]==0 and A[3]==0 and A[6]==0:
    print('Yes')
elif A[1]==0 and A[4]==0 and A[7]==0:
    print('Yes')
elif A[2]==0 and A[5]==0 and A[8]==0:
    print('Yes')

elif A[0]==0 and A[4]==0 and A[8]==0:
    print('Yes')
elif A[2]==0 and A[4]==0 and A[6]==0:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

#ABC157.B
A1 = list(map(int,input().split()))
A2 = list(map(int,input().split()))
A3 = list(map(int,input().split()))
N = int(input())
b = [int(input())for _ in range(N)]
if (A1[0] in b)and (A1[1]in b)and (A1[2] in b):
    print('Yes')
elif (A2[0]in b)and(A2[1] in b)and(A2[2]in b):
    print('Yes')
elif (A3[0]in b)and(A3[1]in b)and (A3[2]in b):
    print('Yes')
elif (A1[0]in b)and(A2[0]in b)and(A3[0]in b):
    print('Yes')
elif (A1[1]in b)and (A2[1]in b)and(A3[1]in b):
    print('Yes')
elif (A1[2] in b)and (A2[2]in b)and(A3[2]in b):
    print('Yes')
elif (A1[0]in b)and (A2[1]in b)and(A3[2]in b):
    print('Yes')
elif (A1[2]in b)and (A2[1]in b)and(A3[0]in b):
    print('Yes')
else:
    print('No')
S = set(list(input()))
alpha = set([chr(ord('a') + i) for i in range(26)])
answer = alpha - S
L=list(answer)
L.sort()
if len(L) = 0:
    print('None')
else:
    print(L[0])


### FIXED CODE ###

S = set(list(input()))
alpha = set([chr(ord('a') + i) for i in range(26)])
answer = alpha - S
L=list(answer)
if len(L) == 0:
    print('None')
else:
    L.sort()
    print(L[0])
int r
int t
t = 3*r*r
print(t)

### FIXED CODE ###

r=int(input())
print(3*(r**2))
n, m = map(int, input().split())

x = list(map(int, input().split()))
x.sort()

distance = []

for i in range(len(x) - 1):
    tmp = x[i + 1] - x[i]
    distance.append(tmp)

distance.sort()

for i in range(n - 1):
    distance.pop()

print(sum(distance))


### FIXED CODE ###

n, m = map(int, input().split())

x = list(map(int, input().split()))
x.sort()

distance = []

for i in range(len(x) - 1):
    tmp = x[i + 1] - x[i]
    distance.append(tmp)

distance.sort()
if n >= m:
    print(0)
else:
    for i in range(n - 1):
        distance.pop()

    print(sum(distance))
S,T=map(str(input().split()))
print(str(T)+str(S))

### FIXED CODE ###

S,T=map(str,input().split())
print(T+S)
a = list(map(int, input().split()))
a.append(a[0]-1)
a.append(a[1]-1)
a.sort()
pirnt(a[-1]+ a[-2])



### FIXED CODE ###

A, B = map(int , input().split())
maxi = 0
if A < B:
    maxi = B
    B -= 1
else :
    maxi = A
    A -= 1
if A < B:
    maxi += B
else :
    maxi += A
print(maxi)
a,b,c=map(int,input().split())
ans=[0]*b
if c>b-2:
    for i in range(b):
        d=(i+1)*b-1
        ans[i]=int((a*d)/b)-a*(int(d/b))
        if c<d:
            break
else :
    for i in range(c):
        ans[i]=int((a*i)/b)-a*(int(i/b))
print(max(ans))

### FIXED CODE ###


import math
 
def f(A, B, X):
	return math.floor((A*X)/B) - A*math.floor(X/B)
 
A,B,N = map(int,input().split())
 
if N < B:
	print(f(A,B,N))
else:
	print(f(A,B,B-1))
a,b,c = map(int,input().split())
d = a*b
if d > c:
print('c')
else if:
print('d')


### FIXED CODE ###

a,b,c = map(int,input().split())
d = a*b
if d>c:
	print(c)
else:
	print(d)
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))

a = list(input())
li = ["A","B","C","D","E","F"]

for i in range(6):
    if a[0] == li[i]:
        a[0] = i
    if a[1] == li[i]:
        a[1] = i

if a[0] > a[1]:
    print(">")
elif a[0] == a[1]:
    print("=")
else:
    print("<")




### FIXED CODE ###

#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))

a = list(input().split())
li = ["A","B","C","D","E","F"]



if a[0] > a[1]:
    print(">")
elif a[0] == a[1]:
    print("=")
else:
    print("<")
N, W = map(int, input().split())
Wl, Vl = [], []
for i in range(N):
    w, v = map(int, input().split())
    Wl.append(w); Vl.append(v)

dp = [[10**9+1]*(10**5+100) for _ in range(N+2)]
dp[0][0] = 0

ans = 0
for i in range(N):
    w, v = Wl[i], Vl[i]
    for j in range(10**5):
        if j+v < 10**9+1:
            dp[i+1][j+v] = min(dp[i+1][j+v],
                                dp[i][j]+w)
        dp[i+1][j] = min(dp[i+1][j], dp[i][j])
        if dp[i+1][j+v] <= W: ans=max(ans, j+v)
        if dp[i+1][j] <= W: ans=max(ans, j)
print(ans)

### FIXED CODE ###

import numpy as np
N, W = map(int, input().split())
dp = np.full(N*10**3+1, W+1)
dp[0] = 0

for i in range(N):
    w, v = map(int, input().split())
    dp[v:] = np.minimum(dp[v:], dp[:-v]+w)
print(np.where(dp<=W)[0][-1])
a=list(map(int,input().split()))
a.sort()
print(" ".join(a))

### FIXED CODE ###

a=list(map(int,input().split()))
a.sort()
print(a[0],a[1],a[2])
n,k = map(int, input().split())
array = list(map(int, input().split()))

one_tento:int = 0 # Aの転倒数を求める
for i in range(n-1):
    for j in range(i+1,n):
        if array[i] > array[j]:
            one_tento += 1
two_tento:int = 0 # ２つのAの転倒数を求める
for i in range(n):
    for j in range(n):
        if array[i] > array[j]:
            two_tento += 1

result1:int = (one_tento * k) % (7 + 10**9)
result2:int = (two_tento * k * (k - 1) / 2) % (7 + 10**9)
#print('本来のただしい答えは、{}'.format(int(result1 % (7 + 10 ** 9))))
#print('公式に当てはめた答えは{}'.format(int(result2 % (7 + 10 ** 9))))
result3:int = (result1 + result2)% (7 + 10**9)
print(int(result3))

### FIXED CODE ###

n,k = map(int, input().split())
array = list(map(int, input().split()))

one_tento = 0
for i in range(n-1):
    for j in range(i+1,n):
        if array[i] > array[j]:
            one_tento += 1
one_tento = int(one_tento)

two_tento = 0
for i in range(n):
    for j in range(n):
        if array[i] > array[j]:
            two_tento += 1
two_tento = int(two_tento)

result1 = (one_tento * k) % (7 + 10**9)
result2 = ((two_tento % (7 + 10**9)) * ((k * (k - 1) // 2) % (7 + 10**9))) % (7 + 10 **9)
result3 = (result1 + result2) % (7 + 10**9)
print(int(result3))
from typing import List

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

for i in range(N-1, 0, -1):
    if H[i-1] - H[i] == 1:
        H[i-1] -= 1
    elif H[i-1] - H[i] > 1:
        print('No')
        break
    if i == 1:
        print('Yes')


### FIXED CODE ###

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

exit_flag = False
for i in range(N-1, 0, -1):
    if H[i-1] - H[i] == 1:
        H[i-1] -= 1
    elif H[i-1] - H[i] > 1:
        exit_flag = True
        print('No')
        break

if not exit_flag:
    print('Yes')
N, M = map(int, input().split())
A = [int(input()) for _ in range(M)]
A = set(A)

mod = 1000000007

dp = [0] * (N + 1)

if len(dp) <= 2:
  return 1

dp[-1] = 1
dp[-2] = 1 if N - 1 not in A else 0

for i in range(N-2, -1, -1):
  if i not in A:
    dp[i] = dp[i+1] + dp[i+2]

print(dp[0] % mod)


### FIXED CODE ###

N, M = map(int, input().split())
A = set([int(input()) for _ in range(M)])

mod = 1000000007

dp = [0] * (N + 2)
dp[N] = 1  # GOAL

for i in range(N-1, -1, -1):
  if i not in A:
    dp[i] = dp[i+1] + dp[i+2]

print(dp[0] % mod)
N=int(input())
numlist=[1, 6, 9, 36, 81, 216, 729, 1296, 6561, 7776, 46656, 59049]
timeslis2=[0,]*(100000)
timeslis2[1]=1
numlist2=numlist[::-1]
def times2(N):
    if N!=0:
        if timeslis2[N]==0:
            mini2=[]
            i=0
            while i<=11 and len(mini2)<=2:
                if N-numlist2[i]>=0:
                    mini2.append(times2(N-numlist2[i]))
                #print(mini2,numlist2[i],i)
                i+=1
            mini2.sort()
            timeslis2[N]=mini2[0]+1
            return mini2[0]+1
        else:
            return timeslis2[N]
    return 0
print(times2(N))

### FIXED CODE ###

N=int(input())
numlist=[1, 6, 9, 36, 81, 216, 729, 1296, 6561, 7776, 46656, 59049]
timeslis2=[0,]*(100001)
timeslis2[1]=1
numlist2=numlist[::-1]
def times2(N):
    if N!=0:
        if timeslis2[N]==0:
            mini2=[]
            i=0
            while i<=11 and len(mini2)<=2:
                if N-numlist2[i]>=0:
                    mini2.append(times2(N-numlist2[i]))
                #print(mini2,numlist2[i],i)
                i+=1
            mini2.sort()
            timeslis2[N]=mini2[0]+1
            return mini2[0]+1
        else:
            return timeslis2[N]
    return 0
print(times2(N))
# -*- coding: utf-8 -*-

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

street = []

for i in range(0,M):
    street.append(0)
    
for i in range(0,M):
    a, b = map(int,input().split())
    street[a-1] += 1
    street[b-1] += 1

for i in range(0,N):
    print(street[i])

### FIXED CODE ###

# -*- coding: utf-8 -*-

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

street = [0 for i in range(N)]

for i in range(M):
    a, b = map(int,input().split())
    street[a-1] += 1
    street[b-1] += 1

for s in street:
    print(s)
n,k=map(int,input().split())
s=list(str(input()))
r=[]
l=[]
c=0
d=1
for i in range(n):
	if s[i]=='1' and d==1:
		r.append(i)
		c=1
		d=0
	elif s[i]=='0' and c==1:
		l.append(i-1)
		c=0
		d=1
if c>0:
	l.append(i)
if len(r)<=k+1:
	r=[0]*(k+1-len(r))+r+[n-1]*(k+1-len(r))
	l=[0]*(k+1-len(l))+l+[n-1]*(k+1-len(l))
ans=0
for i in range(k+1):
	ans=max(ans,l[i+k]-r[i]+1)
print(ans)

### FIXED CODE ###

n,k=map(int,input().split())
s=list(str(input()))
r=[]
l=[]
c=0
d=1
for i in range(n):
	if s[i]=='1' and d==1:
		r.append(i)
		c=1
		d=0
	elif s[i]=='0' and c==1:
		l.append(i-1)
		c=0
		d=1
if c>0:
	l.append(i)
if len(r)<=k+1:
	r=[0]*(k+1-len(r))+r+[n-1]*(k+1-len(r))
	l=[0]*(k+1-len(l))+l+[n-1]*(k+1-len(l))
r=[0]+r+[n-1]
l=[0]+l+[n-1]
ans=0
for i in range(len(r)-k):
	ans=max(ans,l[i+k]-r[i]+1)
print(ans)
import sys
import collections

import heapq
def input():
    return sys.stdin.readline()[:-1]

n=int(input())
a=list(map(int,input().split()))
tmp=collections.Counter(a)
b=list(tmp.values())
b=list(map(lambda  x:x*-1, b))
heapq.heapify(b)
ans=0
while 1:
    cnt1=heapq.heappop(b)
    if cnt1==-1:
        break
    cnt2=heapq.heappop(b)
    if cnt2==-1:
        ans+=cnt1*-2-2
        break
    ans+=max(cnt1,cnt2)*-2-2
    heapq.heappush(b,cnt1-max(cnt1,cnt2)-1)
    heapq.heappush(b,cnt2-max(cnt1,cnt2)-1)
print(n-ans)

### FIXED CODE ###

import sys
import collections

import heapq
def input():
    return sys.stdin.readline()[:-1]

n=int(input())
a=list(map(int,input().split()))
tmp=collections.Counter(a)
if len(tmp)%2==0:
    print(len(tmp)-1)
else:
    print(len(tmp))
a


### FIXED CODE ###

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

def cmb(n, r, mod):
    if ( r<0 or r>n ):
        return 0
    r = min(r, n-r)
    return g1[n] * g2[r] * g2[n-r] % mod

mod = 10**9+7 #出力の制限
P = 10**4
g1 = [1, 1] # 元テーブル 階乗
g2 = [1, 1] #逆元テーブル 逆元の階乗
inverse = [0, 1] #逆元テーブル計算用テーブル

for i in range( 2, P + 1 ):
    g1.append( ( g1[-1] * i ) % mod )
    inverse.append( ( -inverse[mod % i] * (mod//i) ) % mod )
    g2.append( (g2[-1] * inverse[-1]) % mod )

#a = cmb(n,r,mod)

print(N - K + 1)

for i in range(2, K + 1):
    ans = cmb(K - 1, i - 1, mod) * cmb(N - K + 1, i, mod) % mod
    print(ans)
from collections import Counter
import bisect

def sortedexist(list,x):
    if bisect.bisect_left == bisect.bisect_right:
        return False
    else:
        return True

N = int(input())
A = [int(hoge) for hoge in input().split()]
C = Counter(A)
A.sort()
done = dict()
for a in A:
    done[a] = False
dp = [False] * 10**6

for a in A:
    if done[a]:
        dp[a] = True
    else:
        for j in range(2,10**6 // a):
            dp[a*j] = True
        done[a] = True
print(sum([dp[a] == False for a in A ]))

### FIXED CODE ###

N = int(input())
A = [int(hoge) for hoge in input().split()]
A.sort()
M = max(A)
dp = [False] * (M+ 1)
ans = 0
prev = -1
for a in A:
    if dp[a] == False:
        for j in range(2,1 + (M// a)):
            dp[a*j] = True
        if a != prev:
            ans += 1
        else:
            dp[a] = True
            ans -= 1
    prev = a
print(ans)
myinput_H = input()
mylist = list(map(int, myinput_H.split(" ")))
A = mylist[0]
B = mylist[1]
C = mylist[2]
def check(a,b,c):
  if (a == b & b != c) or (a == c & b != c) or (b == c & b != a):
    print(Yes)
  else:
    print(No)

check(A,B,C)

### FIXED CODE ###

a = input()
mylist = list(map(int, a.split(" ")))
A = mylist[0]
B = mylist[1]
C = mylist[2]
 
if (A == B and B != C):
  print("Yes")
elif (A == C and B != C):
  print("Yes")
elif (B == C and A != B):
  print("Yes")
else:
  print("No")
import numpy as np
N,K=map(int,input().split())
A=list(map(int,input().split()))
hyoutei=[0]*(N+1)
for i in range(K,N):#K+1-N
    if A[i]/A[i-K]>1:
        print("Yes")
    else:
        print("No")


### FIXED CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
hyoutei=[0]*(N+1)
for i in range(K,N):#K+1-N
    if A[i]/A[i-K]>1:
        print("Yes")
    else:
        print("No")
n = int(input())
sp = [list(input().split())+[i+1] for i in range(n)]
sp = [[s,-int(p),i] for s,p,i in sp]

sp.sort()
print(sp)

for i in sp:
  print(sp[i][2])

"""
from operator import itemgetter

n = int(input())
l = []

for i in range(n):
    s,p = map(str,input().split())
    p = int(p)
    l.append([s,p,i+1])

l.sort(key = itemgetter(0))
l = sorted(l, key = lambda x:(x[1]),reverse = True)
print(l)
"""


### FIXED CODE ###


n = int(input())
sp = [list(input().split())+[i+1] for i in range(n)]
sp = [[s,-int(p),i] for s,p,i in sp]

sp.sort()

for s,p,i in sp:
    print(i)

"""
from operator import itemgetter

n = int(input())
l = []

for i in range(n):
    s,p = map(str,input().split())
    p = int(p)
    l.append([s,p,i+1])

l.sort(key = itemgetter(0))
l = sorted(l, key = lambda x:(x[1]),reverse = True)
print(l)
"""
H, W = map(int, input().split())
px = []
ans = []
for x in range(H):
    px.append(W[x])
    px.append(W[x])

for x in range(px):
    print(px[x])


### FIXED CODE ###

H, W = map(int, input().split())
px = []
ans = []
for x in range(H):
    px.append(input())
    ans.append(px[x])
    ans.append(px[x])

for x in range(len(ans)):
    print(ans[x])
def main()
A=input()
B=input()
x=int(A)
y=int(B)
print(x*y)

### FIXED CODE ###

a,b = map(int,input(). split ())
print(a*b)
b = input()
a = ''
for i in range(4):
    if b[i] == 'A':
        a += 'T'
    elif b[i] == 'T':
        a += 'A'
    elif b[i] == 'C':
        a += 'G'
    elif b[i] == 'G':
        a += 'C'
print(a)


### FIXED CODE ###

b = input()
a = ''
for i in range(len(b)):
    if b[i] == 'A':
        a += 'T'
    elif b[i] == 'T':
        a += 'A'
    elif b[i] == 'C':
        a += 'G'
    elif b[i] == 'G':
        a += 'C'
print(a)
a = 5
print(str(a**1) + str(a**2) + (a**3))

### FIXED CODE ###



a = int(input("\n"))

if 1 <= a <= 10:
    print(int(a + (a**2) + (a**3)))
import sys

def take2(iterable):
    while True:
        yield next(iterable), next(iterable)
#外積
def cross(v1, v2):
    return v1.real * v2.imag - v1.imag * v2.real
# 線分13と線分24の交点を求める
def get_intersection(p1,p2,p3,p4):
    a1 = p4 - p2
    b1 = p2 - p3
    b2 = p1 - p2
    s1 = cross(a1, b2) / 2
    s2 = cross(a1, b1) / 2
    return p1 + (p3 - p1) * s1 / (s1 + s2)

n = int(f.readline())
for i in range(n):
    p1, p2, p3 = [x + y * 1j for x, y in take2(map(float, f.readline().split()))]
    p12 = (p1 + p2) / 2
    p13 = (p1 + p3) / 2
    pxy = get_intersection(p12,p13,p12 + (p2 - p1) * 1j,p13 + (p1 - p3) * 1j)
    r = abs(pxy - p1)
    print('{:.3f} {:.3f} {:.3f}'.format(pxy.real,pxy.imag,r))

### FIXED CODE ###

import sys
f = sys.stdin

def take2(iterable):
    while True:
        yield next(iterable), next(iterable)
#外積
def cross(v1, v2):
    return v1.real * v2.imag - v1.imag * v2.real
# 線分13と線分24の交点を求める
def get_intersection(p1,p2,p3,p4):
    a1 = p4 - p2
    b1 = p2 - p3
    b2 = p1 - p2
    s1 = cross(a1, b2) / 2
    s2 = cross(a1, b1) / 2
    return p1 + (p3 - p1) * s1 / (s1 + s2)

n = int(f.readline())
for i in range(n):
    p1, p2, p3 = [x + y * 1j for x, y in take2(map(float, f.readline().split()))]
    p12 = (p1 + p2) / 2
    p13 = (p1 + p3) / 2
    pxy = get_intersection(p12,p13,p12 + (p2 - p1) * 1j,p13 + (p1 - p3) * 1j)
    r = abs(pxy - p1)
    print('{:.3f} {:.3f} {:.3f}'.format(pxy.real,pxy.imag,r))
def max(iterable, *, default, key)
max(iterable, *[, default=obj, key=func]) -> value max(arg1, arg2, *args, *[, key=func]) -> value

With a single iterable argument, return its biggest item. The default keyword-only argument specifies an object to return if the provided iterable is empty. With two or more arguments, return the largest argument.





### FIXED CODE ###

H, W = list(map(int, input().split()))
ans = []

#目,円
for i in range(1, H):
    area1 = W*i
    area2 = (H-i)//2*W
    area3 = (H-(H-i)//2-i)*W
    area4 = (H-i)*(W//2)
    area5 = (H-i)*(W-(W//2))
    if area1 != 0 or area2 != 0 or area3 !=0:
        ans.append(max(area1, area2, area3)-min(area1, area2, area3))
    if area1 != 0 or area4 != 0 or area5 !=0:
        ans.append(max(area1, area4, area5)-min(area1, area4, area5))

#皿、ト
for i in range(1, W):
    area6 = H*i
    area7 = (W-i)//2*H
    area8 = (W-(W-i)//2-i)*H
    area9 = (W-i)*(H//2)
    area10 = (W-i)*(H-(H//2))
    if area6 != 0 or area7 != 0 or area8 !=0:
        ans.append(max(area6, area7, area8)-min(area6, area7, area8))
    if area6 != 0 or area9 != 0 or area10 !=0:
        ans.append(max(area6, area9, area10)-min(area6, area9, area10))

print(min(ans))
x,a,b=map(int,input().split())
print((x-a)%b)

### FIXED CODE ###

x,a,b=[int(input()) for i in range(3)]
print((x-a)%b)
n=ll(input())
		a=0
		sum=1
		f=0
		f2=0
		for i in range(1,n):
			a=ll(input())
			if(a==0): 
				f2=1
			sum*=a
			if (sum>1000000000000000000):
				f=1;
		}
		if(f2==1): 
			print("0\n")
		else if(f==1):
			print("-1\n")
		else:
			print(sum)
			print("\n")

### FIXED CODE ###

N=int(input())
 
A=list(map(int,input().split()))
 
if 0 in A:
    print(0)
else:
    result=1
    for a in A:
        result=result*a
        if result>10**18:
            result=-1
            break
    print(result)
n,k=map(int,input().split())
p=[int(x) for x in input().split()]
#さいころの出目の和を集計
for i in range(n):
    p[i]+=1

sdict={}
sdict[0]=p[0]

for i in range(n-1):
	sdict[i+1]=sdict[i]+p[i+1]

j=0
ans=0
while (j+k <=n):
	dif=sdict[j+k]-sdict[j]
	ans=max(dif,ans)
         j+=1
print(ans/2)

### FIXED CODE ###

n,k=map(int,input().split())
p=[int(x) for x in input().split()]
#さいころの出目の和を集計
for i in range(n):
    p[i]+=1

sdict={}
sdict[0]=p[0]

for i in range(n-1):
	sdict[i+1]=sdict[i]+p[i+1]
j=0
ans=0
if n!=k:
	while (j+k <n):
		dif=sdict[j+k]-sdict[j]
		ans=max(dif,ans)
		j+=1
else:
	ans=sum(p)
print(ans/2)
A, B = map(int, input())

if A >= 13:
    print(B)
elif A >= 6:
    print(B // 2)
else:
    print(0)


### FIXED CODE ###

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

if A >= 13:
    print(B)
elif A >= 6:
    print(B // 2)
else:
    print(0)
N = int(input())
s_list = []
s_set = []

for i in range(N):
	s_list.append(list(input().split('')))

for i in s_list:
	s_set.append(set(i))

result_char = set()

for i in range(N-1):
	result_char = (s_set[i] & s_set[i+1] & result_char)

result_char = list(result_char).sort()
result = ''
for i in result_char:
	count = min(x[i] for x in s_list)
	result += i*count
print(result)

### FIXED CODE ###

N = int(input())
s_list = []
s_set = []

for i in range(N):
	s_list.append(list(x for x in input()))

for i in s_list:
	s_set.append(set(i))

result_char = {x for x in 'qwertyuiopasdfghjklzxcvbnm'}

for i in range(N-1):
	result_char = (s_set[i] & s_set[i+1] & result_char)

result_char = list(result_char)
result_char.sort()

result = ''
for i in result_char:
	count = min(x.count(i) for x in s_list)
	result += i*count
print(result)
def main():
    import sys
    input = sys.stdin.buffer.readline
    s = input()
    n = len(s)
    s_l = s[:(n-1)/2]
    s_r = s[(n+3)/2:]
    if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    import sys
    #input = sys.stdin.readline
    s = input()
    n = len(s)
    s_l = s[:int((n-1)/2)]
    s_r = s[int((n+1)/2):]
    if s == s[::-1] and s_l == s_l[::-1] and s_r == s_r[::-1]:
        print('Yes')
    else:
        print('No')


if __name__ == '__main__':
    main()
n = int(input())
a = [int(input()) for _ in range(n)]

for i in range(n):
    ac = a.copy()
    del ac[i]
    print(max(ac))


### FIXED CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]
s, f = sorted(a)[-2:]

for ai in a:
    print(f if ai != f else s)