Harryxun/stf_run huggingface dataset:
for i in range(K):
	A2 = B + C
	B2 = C + A
	C2 = A + B	

	A,B,C = A2, B2, C2


if abs(A-B) > 10**18:
	print(Unfair)
else:
	print(A-B)

### FIXED CODE ###

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

if K % 2 == 0:
	print(A-B) if abs(A-B)<=10**18 else print("Unfair")
else:
	print(B-A) if abs(A-B)<=10**18 else print("Unfair")
from sys import stdin

def main():
    S = int(input())

    p1, p2, p3 = (0, 0), (1, S), (2, 0)
    print(*p1, *p2, *p3)

input = lambda: stdin.readline()
main()


### FIXED CODE ###

from math import ceil
from sys import stdin

def main():
    S = int(input())

    a = d = ceil(S ** 0.5)
    b = a * d - S
    c = 1
    print(0, 0, a, b, c, d)

input = lambda: stdin.readline()
main()
S = input()
if(S == "Sunny"):
  print("Cloudy")
if(S = "Cloudy"):
  print("Rainy")
if(S == "Rainy"):
  print("Sunny")

### FIXED CODE ###

S = input()
if(S == "Sunny"):
  print("Cloudy")
if(S == "Cloudy"):
  print("Rainy")
if(S == "Rainy"):
  print("Sunny")
print(2<<len(bin(int(input())))-4)

### FIXED CODE ###

print(2**(len(bin(int(input())))-3))
A,B = map(int,input().split())
k = len(bin(B))-2
if k==1:
    totB = bin(B)[-1]
elif B==2**k-1:
    totB = "0"*k
else:
    if bin(B)[-2:]=="00":
        totB = "00"
    elif bin(B)[-2:]=="01":
        totB = "01"
    elif bin(B)[-2:]=="10":
        totB = "11"
    elif bin(B)[-2:]=="11":
        totB = "00"
    a = bin(B)[-1]
    for i in range(-3,-k-1,-1):
        if bin(B)[i]=="0":
            totB = "0"+totB
        elif bin(B)[i]=="1" and a=="1":
            totB = "0"+totB
        elif bin(B)[i]=="1" and a=="0":
            totB = "1"+totB
# print("totB={}".format(totB))
m = len(bin(A-1))-2
if m==1:
    totA = bin(A-1)[-1]
elif A-1==2**m-1:
    totA = "0"*m
else:
    if bin(A-1)[-2:]=="00":
        totA = "00"
    elif bin(A-1)[-2:]=="01":
        totA = "01"
    elif bin(A-1)[-2:]=="10":
        totA = "11"
    elif bin(A-1)[-2:]=="11":
        totA = "00"
    a = bin(A-1)[-1]
    for i in range(-3,-m-1,-1):
        if bin(A-1)[i]=="0":
            totA = "0"+totA
        elif bin(A-1)[i]=="1" and a=="1":
            totA = "0"+totA
        elif bin(A-1)[i]=="1" and a=="0":
            totA = "1"+totA
totA = int(totA,2)
totB = int(totB,2)
tot = totA^totB
print(tot)

### FIXED CODE ###

def f(N):
    if N==0:
        return 0
    if N==1:
        return 1
    if N==2:
        return 1^2
    if N==3:
        return 0
    k = 2
    while 2**k<=N:
        k += 1
    k -= 1
    if 2**k==N:
        return N
    n = (N-2**k)//4
    cnt = 0
    i = 2**k+4*n
    while i<=N:
        cnt = cnt^i
        i += 1
    return cnt
A,B = map(int,input().split())
if A==0 and B==0:
    print(0)
elif A==0 and B>0:
    print(f(B))
else:
    print(f(B)^f(A-1))
N, M = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(M)]

ans = 0
for i in range(M):
    ab_list = [[] for i in range(N)]
    for j in range(M):
        if i != j:
            k = ab[j]
            ab_list[k[0] - 1].append(k[1] - 1)
            ab_list[k[1] - 1].append(k[0] - 1)
            
    DFS_list = [False for j in range(N)]
    
    def DFS(v):
        DFS_list[v] = True
        for j in ab_list[v]:
            if not DFS_list[j]:
                DFS(j)
    DFS(i)
    if False in DFS_list:
        ans += 1
print(ans)



### FIXED CODE ###

def wf(this_graf):
    s = len(graf)
    for k in range(s):
        for i in range(s):
            for j in range(s):
                this_graf[i][j] = min(this_graf[i][j], this_graf[i][k] + this_graf[k][j])
    return this_graf

n, m = map(int, input().split())
ab = [list(map(int, input().split())) for i in range(m)]
graf = [[10 ** 10 for i in range(n)] for j in range(n)]

for i, j in ab:
    graf[i - 1][j - 1] = 1
    graf[j - 1][i - 1] = 1

import copy
cnt = 0

for i, j in ab:
    this_graf = copy.deepcopy(graf)
    tmp = 0
    this_graf[i - 1][j - 1] = 10 ** 10
    this_graf[j - 1][i - 1] = 10 ** 10
    this_graf = wf(this_graf)
    for i in range(n):
        for j in range(n):
            if this_graf[i][j] == 10 ** 10:
                tmp = 1
                break
        if tmp:
            break
    cnt += tmp

print(cnt)
a=input()
print("Yes"if int(a)%sum([int(a[i]) for i in range(len(a))])==0 else "No")


### FIXED CODE ###

money,time,allmoney = map(int,input().split())
product = money * time
print(product if product < allmoney else allmoney)
import os,re,sys,operator,math
from collections import Counter,deque
from operator import itemgetter
from itertools import accumulate,combinations,groupby
from sys import stdin,setrecursionlimit
from copy import deepcopy
import heapq
import numpy as np

setrecursionlimit(10**6)
s=stdin.readline().rstrip()
lens=len(s)
loop1=1
loop2=lens-2
t2=list(s[-1])
t1=list(s[0])
now=0
z=""
while loop1<lens:
    z=str(s[loop1])
    ch=False
    while loop1<lens:
        if z!=t1[now]:
            t1.append(z)
            ch=True
            now+=1
            break
        else:
            loop1+=1
            if loop1<lens:
                z+=s[loop1]
    if not ch:
        t1[-1]+=z
    loop1+=1
z=""
now=0
while loop2>-1:
    z=str(s[loop2])
    ch=False
    while loop2>-1:
        if z!=t2[now]:
            t2.append(z)
            ch=True
            now+=1
            break
        else:
            loop2-=1
            if loop2>-1:
                z+=s[loop2]
    if not ch:
        t2[-1]+=z
    loop2-=1
print(max(len(t1),len(t2)))

### FIXED CODE ###

import os,re,sys,operator,math
from collections import Counter,deque
from operator import itemgetter
from itertools import accumulate,combinations,groupby
from sys import stdin,setrecursionlimit
from copy import deepcopy
import heapq


setrecursionlimit(10**6)
s=stdin.readline().rstrip()
lens=len(s)
loop1=1
loop2=lens-2
t2=list(s[-1])
t1=list(s[0])
now=0
z=""
while loop1<lens:
    z=str(s[loop1])
    ch=False
    while loop1<lens:
        if z!=t1[now]:
            t1.append(z)
            ch=True
            now+=1
            break
        else:
            loop1+=1
            if loop1<lens:
                z+=s[loop1]
    if not ch:
        t1[-1]+=z
    loop1+=1
z=""
now=0
while loop2>-1:
    z=str(s[loop2])
    ch=False
    while loop2>-1:
        if z!=t2[now]:
            t2.append(z)
            ch=True
            now+=1
            break
        else:
            loop2-=1
            if loop2>-1:
                z+=s[loop2]
    if not ch:
        t2[-1]+=z
    loop2-=1
print(max(len(t1),len(t2)))
N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
 
manzoku = 0
prev = 0
 
for a in A:
  manzoku += B[a-1]
  if prev = a:
    manzoku += C[prev-1]
  prev = a
print(manzoku)


### FIXED CODE ###

N = int(input())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))
 
manzoku = 0
prev = 0
 
for a in A:
  manzoku += B[a-1]
  if prev+1 == a and prev != 0:
    manzoku += C[prev-1]
  prev = a
print(manzoku)
from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
ts=time.time()
sys.setrecursionlimit(10**6)
input=sys.stdin.readline
show_flg=False
show_flg=True

an=0
k=0
s=input()
d=['Sunny','Cloudy','Rainy','Sunny']
print(d[d.index(s)+1])


### FIXED CODE ###

from heapq import heappush, heappop
from collections import deque,defaultdict,Counter
import itertools
from itertools import permutations,combinations
import sys
import bisect
import string
import math
import time
import random
def I():
    return int(input())
def MI():
    return map(int,input().split())
def LI():
    return [int(i) for i in input().split()]
def LI_():
    return [int(i)-1 for i in input().split()]
def show(*inp,end='\n'):
    if show_flg:
        print(*inp,end=end)
YN=['Yes','No']
mo=10**9+7
ts=time.time()
sys.setrecursionlimit(10**6)
#input=sys.stdin.readline
show_flg=False
show_flg=True

an=0
k=0
s=input()
d=dict()
d['Sunny']='Cloudy'
d['Cloudy']='Rainy'
d['Rainy']='Sunny'
print(d[s])
s = input()

def f(a,b):
  return (a in s and b not in s) or (b in s and a not in s):
  
if f('W', 'E') or f('N', 'S'):
  print('No')
else:
  print('Yes')

### FIXED CODE ###

s = input()

def f(a,b):
  return (a in s and b not in s) or (b in s and a not in s)
  
if f('W', 'E') or f('N', 'S'):
  print('No')
else:
  print('Yes')
#coding: utf-8
from math import ceil, floor
X = int(input())
a = 0
a2 = -a
def sign(v):
    if v < 0:
        return -1
    else:
        return 1
def counter(a):
    v = abs(a)
    for i in range(1, int(v**0.5)+2):
        if v % i == 0:
            if v == i**5:
                return True
    return False
while True:
    a2 = -a
    b = (a**5 - X)
    b2 = (a2**5 - X)
    if counter(b):
        if a**5 - b == X:
            print(a, int(abs(round(b))**(1/5))*sign(b))
            quit()
    if counter(b2):
        if a2 ** 5 - b2 == X:
            print(a2, int(abs(round(b))**(1/5))*sign(b2))
            quit()
    a += 1


### FIXED CODE ###

#coding: utf-8
N, K = map(int, input().split())
A = [0 for _ in range(N)]
ans = 0
for i in range(K):
    d = int(input())
    tmp = list(map(int, input().split()))
    for j in range(d):
        A[tmp[j]-1] += 1
for i in range(N):
    if A[i] == 0:
        ans += 1
print(ans)
a,b,x = map(int,input().split())
if a == 0:
  ans = b//x + 1
else:
  ans = (b-a+1)//x
  if a%x == 0 and b%x == 0:
    ans = ans + 1
  if x == 1:
    ans = ans - 1
print(ans)

### FIXED CODE ###

a,x,c = input().split()
X = x[0]
list = ['A',X,'C']
ans = ''.join(list)
print(ans)
S = input()
if S[1] == S[2]or S[2] == S[3]or S[3] == S[4]:
    print("Bad")
else:
    print("Good")


### FIXED CODE ###

S = input()
if S[0] == S[1] or S[1] == S[2] or S[2] == S[3]:
    print("Bad")
else:
    print("Good")
# ABC134E

import sys
input=sys.stdin.readline

def main():
    N=int(input())
    A=[int(input()) for i in range(N)]
    
    cho=[0]*(10**9+1)
    cho[A[0]]+=1
    maxset=set([A[0]])
    
    for i in range(1,N):
        remset=set()
        for m in maxset:
            if A[i]>m:
                remset.add(m)
            if A[i]==m:
                cho[m]+=1
        if len(remset)>0:
            maxset.remove(max(remset))
            maxset.add(A[i])
        else:
            maxset.add(A[i])
            
    print(max(len(maxset),max(cho)))
    
if __name__=="__main__":
    main()


### FIXED CODE ###

# ABC134E

import sys
input=sys.stdin.readline

def bisectR(ite,x):
    st=-1
    en=len(ite)
    while(en-st>1):
        mid=(en+st)//2
        if ite[mid]<x:
            en=mid
        else:
            st=mid
    return en

def main():
    N=int(input())
    A=[int(input()) for i in range(N)]
    
    lbds=[A[0]]
    for i in range(1,N):
        if lbds[-1]>=A[i]:
            lbds+=[A[i]]
        else:
            x=bisectR(lbds,A[i])
            lbds[x]=A[i]
    print(len(lbds))
    
if __name__=="__main__":
    main()
from sys import stdin


def b(input_string):
    a, b, k = [int(x) for x in input_string.split()]
    mod_0_numbers = []
    if a >= b:
        for i in range(1, a):
            if a % i == 0:
                if b % i == 0:
                    mod_0_numbers.append(i)
    else:
        for i in range(1, b):
            if b % i == 0:
                if a % i == 0:
                    mod_0_numbers.append(i)
    return mod_0_numbers[-k]


def main():
    input_line = stdin.readline().rstrip()
    answer = b(input_line)
    print(answer)


if __name__ == '__main__':
    main()


### FIXED CODE ###

from sys import stdin


def b(input_string):
    a, b, k = [int(x) for x in input_string.split()]
    mod_0_numbers = []
    if a >= b:
        for i in range(1, a+1):
            if a % i == 0:
                if b % i == 0:
                    mod_0_numbers.append(i)
    else:
        for i in range(1, b+1):
            if b % i == 0:
                if a % i == 0:
                    mod_0_numbers.append(i)
    return mod_0_numbers[-k]


def main():
    input_line = stdin.readline().rstrip()
    answer = b(input_line)
    print(answer)


if __name__ == '__main__':
    main()
#! /usr/bin/env python3

from fractions import gcd
from collections import Counter, deque, defaultdict
from heapq import heappush, heappop, heappushpop, heapify, heapreplace, merge
from bisect import bisect_left, bisect_right, bisect, insort_left, insort_right, insort
from itertools import accumulate, product, permutations, combinations, combinations_with_replacement

K = int(input())

d = 10000

LLs = []

def dfs(d, num):
    LLs.append(num)
    
    if d == 10: return

    a = num % 10
    for i in [-1, 0, 1]:
        b = a + i
        if  0 <= b < 10:
            dfs(d+1, num * 10 + b)

d = 1
for i in range(1, 10):
    dfs(d, i)

print(sorted(LLs)[K-1])

### FIXED CODE ###

K = int(input())

LLs = []

def dfs(d, num):
    LLs.append(num)
    
    if d == 10: return

    a = num % 10
    for i in [-1, 0, 1]:
        b = a + i
        if  0 <= b < 10:
            dfs(d+1, num * 10 + b)

d = 1
for i in range(1, 10):
    dfs(d, i)

print(sorted(LLs)[K-1])
while True:
    H,W = map(int,input().split())
    if H == W == 0:
        break
    for i in range(1, H):
        if i == 1,H:
            print("#"*W)
        else:
            print("#","."*(W-2),"#")
    print()


### FIXED CODE ###

while True:
    H,W = map(int,input().split())
    
    if H == W == 0:
        break
    
    for i in range(H):
        if i == 0 or i == H-1:
            print('#' * W)
        else:
            print('#','.'*(W-2),'#',sep='')
    print('')
if input() == "Sunny":
  print("Cloudy")
elif input() == "Cloudy":
  print("Rainy")
else:
  print("Sunny")


### FIXED CODE ###

s = input()
if s == "Sunny":
  print("Cloudy")
elif s == "Cloudy":
  print("Rainy")
else:
  print("Sunny")
def memorize(func):
    memo = {}
    def wrapper(*args):
        if args not in memo:
            memo[args] = func(*args)
        return memo[args]
    return wrapper

@memorize
def amida(W):   # W本の棒に対する1行アミダの引き方
    if W<2:
        return 1
    else:
        return amida(W-1)+amida(W-2)

@memorize
def amida2(H, W, x):
    if H==0:
        return 1 if x==1 else 0
    a = 0 if x==1 else amida(x-2)*amida(W-x)*amida2(H-1, W, x-1)
    b = amida(x-1)*amida(W-x)*amida2(H-1, W, x, y)
    c = 0 if x==W else amida(x-1)*amida(W-x-1)*amida2(H-1, W, x+1)
    return (a+b+c)%1000000007
print(amida2(*map(int, input().split())))

### FIXED CODE ###

def memorize(func):
    memo = {}
    def wrapper(*args):
        if args not in memo:
            memo[args] = func(*args)
        return memo[args]
    return wrapper

@memorize
def amida(W):   # W本の棒に対する1行アミダの引き方
    if W<2:
        return 1
    else:
        return amida(W-1)+amida(W-2)

@memorize
def amida2(H, W, x):
    if H==0:
        return 1 if x==1 else 0
    a = 0 if x==1 else amida(x-2)*amida(W-x)*amida2(H-1, W, x-1)
    b = amida(x-1)*amida(W-x)*amida2(H-1, W, x)
    c = 0 if x==W else amida(x-1)*amida(W-x-1)*amida2(H-1, W, x+1)
    return (a+b+c)%1000000007
print(amida2(*map(int, input().split())))
if a >= k:
  a -= k
  print(str(a)+" "+str(b))

elif a< k and a+b >=k:
  b -= (k-a)
  a = 0
  print(str(a)+" "+str(b))

else:
  a = 0
  b = 0
  print(str(a)+" "+str(b))

### FIXED CODE ###

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

if a >= k:
  a -= k
  print(str(a)+" "+str(b))

elif a< k and a+b >=k:
  b -= (k-a)
  a = 0
  print(str(a)+" "+str(b))

else:
  a = 0
  b = 0
  print(str(a)+" "+str(b))
MOD = 10**9 + 7
N = int(input())
paths = {i:[] for i in range(N+1)}
for _ in range(N-1):
    x, y = map(int, input().split())
    paths[x].append(y)
    paths[y].append(x)

dpt = [[[-1] * 2 for i in range(N+1)] for j in range(N+1)]

def count_cc(prev, node, color):
    if dpt[prev][node][color] != -1:
        return dpt[prev][node][color]
    if paths[node] == [prev]:
        dpt[prev][node][color] = 1
        return 1
    result = 1
    if color == 0:
        for nxt in paths[node]:
            if nxt == prev:
                continue
            result *= (count_cc(node, nxt, 0) + count_cc(node, nxt, 1))
            result %= MOD
    else:
        for nxt in paths[node]:
            if nxt == prev:
                continue
            result *= count_cc(node, nxt, 0)
            result %= MOD

    dpt[prev][node][color] = result
    return result

print(count_cc(0, 2, 0) + count_cc(0, 2, 1))


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)

MOD = 10**9 + 7
N = int(input())
paths = {i:[] for i in range(N+1)}
for _ in range(N-1):
    x, y = map(int, input().split())
    paths[x].append(y)
    paths[y].append(x)

dpt = [[-1] * 2 for i in range(N+1)]

def count_cc(prev, node, color):
    if dpt[node][color] != -1:
        return dpt[node][color]
    if paths[node] == [prev]:
        dpt[node][color] = 1
        return 1
    result = 1
    if color == 0:
        for nxt in paths[node]:
            if nxt == prev:
                continue
            result *= (count_cc(node, nxt, 0) + count_cc(node, nxt, 1))
            result %= MOD
    else:
        for nxt in paths[node]:
            if nxt == prev:
                continue
            result *= count_cc(node, nxt, 0)
            result %= MOD

    dpt[node][color] = result
    return result

print((count_cc(0, 1, 0) + count_cc(0, 1, 1)) % MOD)
import collections
import fractions

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 set(a)

A, B = list(map(int, input().split()))
print(len(fractions.gcd(A, B)) + 1)


### FIXED CODE ###

import collections
import fractions

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 set(a)


A, B = list(map(int, input().split()))
print(len(prime_factorize(fractions.gcd(A, B))) + 1)
a,b,c = list(map(int,input().split()))

if a + b + c <= 21:
    print("win")

else:
    print("bust")12 

### FIXED CODE ###

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

if a + b + c <= 21:
    print("win")

else:
    print("bust")
n,k = map(int,input().split())
s= input()
if s[k-1] == "A":
  s[k-1] = "a"
elif s[k-1] == "B":
  s[k-1] ="b"
elif s[k-1] =="C":
  s[k-1] = "c"
print(s)

### FIXED CODE ###

n,k = map(int,input().split())
s= input()
a=""
for i in range(len(s)):
    c = s[i]
    if i == k-1:
      if s[k-1] == "A":
        c = "a"
      elif s[k-1] == "B":
        c = "b"
      elif s[k-1] =="C":
        c = "c"
    a = a+c
print(a)
import sys
sys.setrecursionlimit(500*500)

N = int(input())
edges = [list(map(int, input().split())) for _ in range(N-1)]

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

for edge in edges:
    A[edge[0]].append(edge[1], edge[2])
    A[edge[1]].append(edge[0], edge[2])

depth = [-1] * (N-1)
depth[1] = 0

def dfs(A, s):
    for v in A[s]:
        if depth[v[0]] == -1:
            depth[v[0]] = depth[s] + v[1]
            dfs[A, v[0]]

dfs[A, 1]
for d in depth[1:]:
    if d % 2 == 0:
        print(0)
    else:
        print(1)

### FIXED CODE ###

import sys
sys.setrecursionlimit(500*500)

N = int(input())
edges = [list(map(int, input().split())) for _ in range(N-1)]

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

for edge in edges:
    A[edge[0]].append([edge[1], edge[2]])
    A[edge[1]].append([edge[0], edge[2]])

depth = [-1] * (N+1)
depth[1] = 0

def dfs(A, s):
    for v in A[s]:
        if depth[v[0]] == -1:
            depth[v[0]] = depth[s] + v[1]
            dfs(A, v[0])

dfs(A, 1)
for d in depth[1:]:
    if d % 2 == 0:
        print(0)
    else:
        print(1)
N, K = map(int, input().split())
mod = 10**9 + 7

for i in range(1, K + 1):
    print(int(((comb(K - 1, i - 1) % mod) * (comb(N - K + 1, i) % mod)) % mod))

### FIXED CODE ###

N, K = map(int, input().split())
mod = 10**9 + 7

factorial = [1]
inverse = [1]

for i in range(1, N + 2):
    factorial.append(factorial[i - 1] * i % mod)
    inverse.append(pow(factorial[i], mod - 2, mod))


def C(n, r):
    if n < r:
        return 0
    return (factorial[n] * inverse[r] * inverse[n - r]) % mod


Atable = [0] * (K + 1)
for i in range(1, K + 1):
    Atable[i] = C(K - 1, i - 1)
Btable = [0] * (K + 1)
for i in range(1, K + 1):
    Btable[i] = C(N - K + 1, i)

for i in range(1, K + 1):
    print(int(((Atable[i] % mod) * (Btable[i] % mod)) % mod))
def gcd(a,b):
  while b>0:
    a,b=b,a%b
  return int(a)
def lcm(a,b):
  return int(a*b/gcd(a,b))
N=int(input())
List_T=[int(input()) for i in range(N)]
T=1
n=1
for i in List_T:
  T=lcm(T,i)
print(T)

### FIXED CODE ###

def gcd(a,b):
  if a<b:
    a,b=b,a
  while b>0:
    a,b=b,a%b
  return int(a)
N=int(input())
T=1
for i in range(N):
  ti=int(input())
  T=T*ti//gcd(T,ti)
print(T)
n = int(input())
for i in range(n):
  a = [int(j) for j in input().split()]
  a[i] = 0
  print(max(a))


  

### FIXED CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]
s = max(a)
if a.count(s) >= 2:
  for i in range(n):  
    print(s)
else:
  for i in range(n):
    if a[i] == s:
      l = a.copy()
      l.sort()
      print(l[-2])
    else:
      print(s)
import sys

parents = [-1] * 20000

def main():

    input = sys.stdin.readline

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


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

        A = A - 1
        B = B - 1

        union(A,B)

    ans = 1
    for i in range(20000):
        ans = max(ans,size(i))

    print(ans)

def find(x):
    if parents[x] < 0:
        return x
    else:
        parents[x] = find(parents[x])
        return parents[x]

def union(x, y):
    x = find(x)
    y = find(y)

    if x == y:
        return 0

    if parents[x] > parents[y]:
        x, y = y, x

    parents[x] += parents[y]
    parents[y] = x

def size(x):
    return -parents[find(x)]


if __name__ == "__main__":
    main()

### FIXED CODE ###

import sys


def main():

    input = sys.stdin.readline

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

    AB = [list(map(int,input().split())) for _ in range(M)]

    UF = UnionFind(N)

    for i in range(M):
        A,B = AB[i]

        A = A - 1
        B = B - 1

        UF.union(A,B)


    ans = 1
    for i in range(N):
        ans = max(ans,UF.size(i))

    print(ans)

class UnionFind():
    def __init__(self, n):
        self.n = n
        self.parents = [-1] * n
        
    def find(self, x):
        if self.parents[x] < 0:
            return x
        else:
            self.parents[x] = self.find(self.parents[x])
            return self.parents[x]
    
    def union(self, x, y):
        x = self.find(x)
        y = self.find(y)
        
        if x == y:
            return
        
        if self.parents[x] > self.parents[y]:
            x, y = y, x
        
        self.parents[x] += self.parents[y]
        self.parents[y] = x
    
    def size(self, x):
        return -self.parents[self.find(x)]
        
    def same(self, x, y):
        return self.find(x) == self.find(y)
    
    def members(self, x):
        root = self.find(x)
        return [i for i in range(self.n) if self.find(i) == root]
    
    def roots(self):
        return [i for i, x in enumerate(self.parents) if x < 0]

    def group_count(self):
        return len(self.roots())
    
    def all_group_members(self):
        return {r: self.members(r) for r in self.roots()}
    
    def __str__(self):
        return '\n'.join('{}: {}'.format(r, self.members(r)) for r in self.roots())

if __name__ == "__main__":
    main()
a,b,c=map(int,input().split())
aa=sort([a,b,c])
if aa == [5,5,7]:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

a,b,c=map(int,input().split())
aa=sorted([a,b,c])
if aa == [5,5,7]:
  print("YES")
else:
  print("NO")