Harryxun/stf_run huggingface dataset:
n = int(input())
a = [int(input()) for i in range(n)]
m1 = max(a)
m2 = sorted(set(a))[-2]
for j in range(n):
	if a[j] < m1:
		print(m1)
	elif a[j] == m1:
		if a.count(m1) > 1:
			print(m1)
		else:
			print(m2)
	else:
		print(m2)

### FIXED CODE ###

n = int(input())
a = [int(input()) for i in range(n)]
m1 = max(a)
c = a.count(m1)
if len(set(a)) == 1:
	for i in range(n):
		print(m1)
else:
	m2 = sorted(set(a))[-2]
	for i in range(n):
		if a[i] < m1:
			print(m1)
		elif a[i] == m1:
			if c > 1:
				print(m1)
			else:
				print(m2)
		else:
			print(m2)
N, M = map(int, input().split())
MOD = 10**9 + 7
A = [int(input()) for _ in range(M)]
if M == 0:
    print(pat[N] % MOD)
else:
    pat = [0] * (N+1)
    pat[1] = 1
    pat[2] = 2
    for i in range(3, N+1):
        pat[i] = (pat[i-1] + pat[i-2]) % MOD
    steps = []
    if len(A) > 1:
        for i in range(M-1):
            d = A[i+1] - A[i]
            if d > 2:
                steps.append(d-2)
            elif d == 1:
                steps.append(0)
    if A[0] != 1:
        steps = [A[0] - 1] + steps
    if A[-1] != N-1:
        steps += [N - A[-1] - 1]
    ans = 1
    for s in steps:
        ans = (ans * pat[s]) % MOD
    print(ans)

### FIXED CODE ###

N, M = map(int, input().split())
MOD = 10**9 + 7
A = [int(input()) for _ in range(M)]
pat = [0] * (N+3)
pat[1] = 1
pat[2] = 2
for i in range(3, N+1):
    pat[i] = (pat[i-1] + pat[i-2]) % MOD
if M == 0:
    print(pat[N] % MOD)
else:
    steps = []
    if len(A) > 1:
        for i in range(M-1):
            d = A[i+1] - A[i]
            if d > 2:
                steps.append(d-2)
            elif d == 1:
                steps.append(0)
    if A[0] != 1:
        steps = [A[0] - 1] + steps
    if A[-1] != N-1:
        steps += [N - A[-1] - 1]
    ans = 1
    for s in steps:
        ans = (ans * pat[s]) % MOD
    print(ans)
N,C,K = map(int,input().split())
Ts = sorted([int(input()) for _ in range(N)])

#print(Ts)

ans = 0
firstFlag = True
passenger = []	#firstTime lastNum
for i in range(N):
	if firstFlag:
		passenger = [Ts[i],C-1]
		firstFlag = False
		#print("first",str(passenger),Ts[i],ans)
	elif i+1 != N -1:
		if passenger[0] + K <= Ts[i+1]:
			#print("time over",str(passenger),Ts[i],ans)
			ans += 1
			firstFlag = True
	elif passenger[1] == 1:
		#print("full",str(passenger),Ts[i],ans)
		ans += 1
		firstFlag = True
	else:
		#print("other",str(passenger),Ts[i],ans)
		passenger[1] -= 1
else:
	#print("close",str(passenger),ans)
	if not firstFlag:
		ans += 1

print(ans)

### FIXED CODE ###

N,C,K = map(int,input().split())
Ts = sorted([int(input()) for _ in range(N)])

#print(Ts)

ans = 0
firstFlag = True
passenger = []	#limit lastNum
for i in range(N):
	if firstFlag:
		passenger = [Ts[i] + K,C-1]
		firstFlag = False
		ans += 1
		#print("first",str(passenger),Ts[i],ans)
	
	if passenger[1] <= 0:
		#print("full",str(passenger),Ts[i],ans)
		firstFlag = True
	elif i+1 < N and passenger[0] < Ts[i+1]:
		#print("time over",str(passenger),Ts[i],ans)
		firstFlag = True
	else:
		#print("other",str(passenger),Ts[i],ans)
		passenger[1] -= 1

print(ans)
from fractions import gcd

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

lcm = N*M//math.gcd(N, M)

ans = lcm

for i in range(lcm):
    if S[N//lcm*i] != T[M//lcm*i]:
        ans = -1
        break
                
print(ans)

### FIXED CODE ###

from fractions import gcd
N,M=map(int,input().split())
S=list(input())
T=list(input())
L=gcd(N,M)
print(N*M//L if all([S[i*N//L]==T[i*M//L] for i in range(L)]) else "-1")
s=input()
print("Yes"if s=="hi"*(len(s)//2)else"No)

### FIXED CODE ###

s=input();print("Yes"if s=="hi"*(len(s)//2)else"No")
# B
n = int(input())
sli = list(map(int, input().spllit()))
for s in sli:
    if s == 'Y':
        print('Four')
        exit()

print('Three')

### FIXED CODE ###

# B
n = int(input())
sli = list(input().split())
for s in sli:
    if s == 'Y':
        print('Four')
        exit()

print('Three')
from collections import deque
import math
mod = 10**9+7
N,K = map(int,input().split())

def facto(x):
    r = 1
    for i in range(1,x+1):
        r *= i
        r %= mod
    return r

def Perm(n,r):#aPb
    return facto(n) // facto(n - r)

K_2perm =[1,K-2]
pres = K-2
#K_2perm[i] = K-2Pi
for i in range(2,K-1):
    pres = (pres*(K-1-i))%mod
    K_2perm.append(pres)
child = [[] for i in range(N)]
for hoge in range(N-1):
    a,b = [int(i)-1 for i in input().split()]
    child[a].append(b)
    child[b].append(a)


went = [False] * N
queue = deque()
queue.append(0)
went[0] = True

ans = Perm(K,len(child[0])+1)%mod
while queue:
    cur = queue.pop()
    if cur!=0:
        ans *= K_2perm[len(child[cur])-1]
        ans %= mod
    for togo in child[cur]:
        if not went[togo]:
            went[togo] = True
            queue.append(togo)
print(ans)



### FIXED CODE ###

from collections import deque
import math
import sys
mod = 10**9+7
N,K = map(int,input().split())

#k
Kperm =[1,K]
pre = K
for i in range(2,K+1):
    pre = (pre*(K+1-i))%mod
    Kperm.append(pre)


#K-2Pxの計算のメモ化
K_2perm =[1,K-2]
pres = K-2
for i in range(2,K-1):
    pres = (pres*(K-1-i))%mod
    K_2perm.append(pres)

child = [[] for i in range(N)]
for hoge in range(N-1):
    a,b = [int(i)-1 for i in input().split()]#点を0-indexedになおす
    child[a].append(b)
    child[b].append(a)

if len(child[0])>=K:
    print(0);sys.exit()
ans = Kperm[len(child[0])+1]
#DFSしながら塗る
went = [False] * N
queue = deque()
queue.append(0)
went[0] = True
while queue:
    cur = queue.pop()
    if cur!=0 and len(child[cur])>=K:
        print(0)
        sys.exit()
    if cur!=0:
        ans *= K_2perm[len(child[cur])-1]
        ans %= mod
    for togo in child[cur]:
        if not went[togo]:
            went[togo] = True
            queue.append(togo)
print(ans)
#ABC162A
import sys
N = sys.stdin.readline().rstrip()

if '7' in N:
    print('Yes')
else:
    print('No')

#ABC162B
import sys
N = int(sys.stdin.readline())
total=0
for i in range(1, N+1):
    if i%3 !=0 and i%5 !=0:
        total+=i
    
print(total)

### FIXED CODE ###

#ABC162A
import sys
N = sys.stdin.readline().rstrip()
 
if '7' in N:
    print('Yes')
else:
    print('No')
import sys
from collections import deque, defaultdict
from itertools import combinations, permutations
from heapq import heapify, heappop, heappush
from math import pi, inf
sys.setrecursionlimit(10000000)

def Attack(L):
    if L == 1: return 1
    else:
        return 1 + 2 * Attack(L//2)

def solve():
    H = int(input())
    print(Attack(H))

    return 0

if __name__ == "__main__":
    solve()

### FIXED CODE ###

import sys
from collections import deque, defaultdict
from itertools import combinations, permutations
from heapq import heapify, heappop, heappush
sys.setrecursionlimit(10000000)

def Attack(L):
    if L == 1: return 1
    else:
        return 1 + 2 * Attack(L//2)

def solve():
    H = int(input())
    print(Attack(H))

    return 0

if __name__ == "__main__":
    solve()
def calc_Stairs_Patterns(num):
    if num >= 2:
        return calc_Stairs_Patterns(num - 1) + calc_Stairs_Patterns(num - 2)
    elif num == -1:
        print(0)
        exit()
    else:
        return 1
N, M = map(int,input().split())
data = []
for i in range(M):
    data.append(int(input()))
ans = 1
stair = 0
for i in data:
    ans *= calc_Stairs_Patterns(i  - 1 - stair)
    stair = i + 1
ans *= calc_Stairs_Patterns(N - stair)
print(ans % 1000000007)


### FIXED CODE ###

N, M = map(int,input().split())
data = []
dp = ['.' for i in range(N + 1)]
dp[0] = 1
dp[1] = 1
for i in range(M):
    k = int(input())
    data.append(k)
    dp[k] = 0
mod = 10**9 + 7
for i in range(2,N + 1):
    if dp[i] != 0:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
print(dp[N] % mod)
N,T=map(int,input().split())
t=list(map(int,input().split()))
diff = [t[i]-t[i-1] fossil i in range(1,N)]
ans=T*N
for i in range(N-1):
  ans-=min((T - diff[i]),0)
print(ans)

### FIXED CODE ###

N,T=map(int,input().split())
t=list(map(int,input().split()))
diff = [t[i]-t[i-1] for i in range(1,N)]
ans=T*N
for i in range(N-1):
  ans-=max((T - diff[i]),0)
print(ans)
import itertools
n,a,b = [int(x) for x in input().split()]

r = range(a,b+1)
tmp = []
ans = 0

if a == b:
    print(1)
elif n == 1:
    print(0)
else:
    for v in itertools.combinations_with_replacement(r, n-2):
        if not sum(v) in tmp:
            ans += 1
            tmp.append(sum(v))

    print(ans)

### FIXED CODE ###

n,a,b = [int(x) for x in input().split()]

if a > b:
    print(0)
elif n == 1:
    if a != b:
        print(0)
    else:
        print(1)
else:
    print((b-a)*(n-2)+1)
if int(input()) == 1:
    print(1)
elif int(input()) % 2 == 0:
    print(0.5)
else:
    print(0.6)


### FIXED CODE ###

x = int(input())
if x == 1:
    print(1)
elif x % 2 == 0:
    print(0.5)
else:
    print((x//2+1)/x)
t,d = map(int,input().split())
p_a = t//(2d+1)
p_b = t%(2d+1)
if p_b == 0:
  print(p_a)
else:
  print(p_a + 1)
  


### FIXED CODE ###

t,d = map(int,input().split())
p_a = t//(2*d+1)
p_b = t%(2*d+1)
if p_b == 0:
  print(p_a)
else:
  print(p_a + 1)
N,M = map(int,input().split())
H = list(map(int,input().split()))
A=[]
count = list(range(N))
for i in range(M):
    A.append(sorted(list(map(int,input().split()))))
set(A)
for j in range(M):
     if H[A[j][0]-1]>H[A[j][1]-1]:
                             if A[j][1]-1 in count:
                                 count.remove(A[j][1]-1)
                             else:
                                 pass
     elif H[A[j][0]-1]<H[A[j][1]-1]:
                              if A[j][0]-1 in count:
                                 count.remove(A[j][0]-1)
                              else:
                                  pass 
     else:
           if A[j][1]-1 in count:
                     count.remove(A[j][1]-1)
           else:
               pass
           if A[j][0]-1 in count:
                     count.remove(A[j][0]-1)
           else:
               pass
print(len(count))                     


### FIXED CODE ###

n,m=map(int,input().split())
h=list(map(int,input().split()))
count=[1]*n
for i in range(m):
  a,b=map(int,input().split())
  if h[a-1]>h[b-1]:
    count[b-1]=0
  elif h[a-1]==h[b-1]:
    count[a-1]=0
    count[b-1]=0
  else:
    count[a-1]=0
print(sum(count))
N = int(input())
if K%2==0:
    print(K//2*(K//2-1))
else:
    print(-(-K//2)*((K-1)//2))

### FIXED CODE ###

N=int(input())
if N%2==0:
  print((N//2)**2)
elif N%2!=0:
  print((N//2)*(N-(N//2)))
def m():
    MOD = 998244353
    N = int(input())
    D = [0] + list(map(int, input().split()))
    if D[1] != 0:
        return 0
    tree = {}
    for i in range(2, N + 1):
        if D[i] == 0: return 0
        tree[D[i] + 1] = tree[D[i] + 1] + 1 if tree.get(D[i] + 1, False) else 1

    height = len(tree.keys())+1
    cnt = 1
    for i in range(2, height):
        cnt = cnt * pow(tree[i-1], tree[i]) % MOD
    return cnt


print(m())


### FIXED CODE ###

def m():
    MOD = 998244353
    N = int(input())
    D = [0] + list(map(int, input().split()))
    if D[1] != 0:
        return 0
    tree = {1:1}
    for i in range(2, N + 1):
        if D[i] == 0: return 0
        tree[D[i] + 1] = tree[D[i] + 1] + 1 if tree.get(D[i] + 1, False) else 1

    height = len(tree.keys())+1
    cnt = 1
    for i in range(2, height):
        if not tree.get(i, 0):
            return 0
        cnt = cnt * pow(tree[i-1], tree[i]) % MOD
    return cnt


print(m())
N,M=map(input().split())

ans=(M*1900 +(N-M)*100)*(2**M)

print(ans)

### FIXED CODE ###

N,M=map(int,input().split())
ans=(M*1900 +(N-M)*100)*(2**M)

print(ans)
X = int(input())
if X == 1:
    print(0)
else:1
    print(1)
    

### FIXED CODE ###

X = int(input())
if X == 1:
    print(0)
else:
    print(1)
X, K, D = map(int, input().split())
s = 0
g = K

def d(h):
    return X + (h - (K-h))*D

if d(s) >= 0:
    ans = d(s)
elif d(g) <= 0:
    ans = g(g)
else:
    half = (s + g)//2
    while s < half:
        if d(half) < 0:
            s = half
        else:
            g = half
        half = (s + g)//2

    ans = min(abs(d(s)) , abs(d(g)) )
print(ans)

### FIXED CODE ###

X, K, D = map(int, input().split())
s = 0
g = K

def d(h):
    return X + (h - (K-h))*D

if d(s) >= 0:
    ans = d(s)
elif d(g) <= 0:
    ans = abs(d(g))
else:
    half = (s + g)//2
    while s < half:
        if d(half) < 0:
            s = half
        else:
            g = half
        half = (s + g)//2

    ans = min(abs(d(s)) , abs(d(g)) )
print(ans)
inport sys
for i in sys.stdin.readlines():
        a,b = i.strip().split()
        if a == "0" and b == "0":
                 break;
        if a < b:
                 print(a,b)
        else:
                 print(b,a)

### FIXED CODE ###

import sys
for i in sys.stdin.readlines():
        a,b = i.strip().split()
        if a == "0" and b == "0":
                break

        if int(a) < int(b):
                print("{0} {1}".format(a,b))
        else:
                print("{1} {0}".format(a,b))
print(input().cont("1"))


### FIXED CODE ###

print(input().count("1"))
S = int(input())
h = S//3600
m = (S%3600)//60
s = S%60
print(h:m:s)



### FIXED CODE ###

S = int(input())
h = S//3600
m = (S%3600)//60
s = S%60
print('%d:%d:%d' %(h,m,s))
A = int(input())
op = input()
B = int(input())

if op == "+":
    print(A + B)
if op == "-":
    print(A - B)

### FIXED CODE ###

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

if op == "+":
    print(A + B)
if op == "-":
    print(A - B)
H,W = map(int,input().split())
maze = []
pad = ' ' * (W+2)
maze.append(pad)
for i in range(H):
  m = input()
  maze.append(' ' + m + ' ')
maze.append(pad)
  
def bfs(maze, x,y, score):
    queue = [(x,y,0)]
    visited = {}
    while queue:
      x,y,s = queue.pop(0)
      if maze[x][y] != '.':
        continue
      visited[(x,y)] = s
      if (x+1,y) not in visited:
        queue.append((x+1,y,s+1))
      if (x-1,y) not in visited:
        queue.append((x-1,y,s+1))
      if (x,y+1) not in visited:
        queue.append((x,y+1,s+1))
      if (x,y-1) not in visited:
        queue.append((x,y-1,s+1))
    return max(visited.values())
  
ans = -1
for h in range(1,H+1):
  for w in range(1,W+1):
    now = maze[h][w]
    if now == '#':
      continue
    if maze[h-1][w] == maze[h+1][w] == maze[h][w-1] == maze[h][w+1] == '.':
      continue
    a = bfs(maze,h,w,0)
    if a > ans:
      ans = a
print(ans)

### FIXED CODE ###

a = input()
print(chr(ord(a)+1))
class UnionFind:
  def __init__(self, N):
    self.r = [-1]*N
  
  def root(self, x):
    if self.r[x] < 0:
      return x
    else:
      self.r[x] = self.root(self.r[x])
      return self.r[x]
  
  def unite(self, x, y):
    x = self.root(x)
    y = self.root(y)
    if x == y:
      return False
    else:
      self.r[x] += self.r[y]
      self.r[y] = x
      return True
    
  def size(self, x):
    return -1*self.r[self.root(x)]
  
  def print(self):
    print(self.r)


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

UF = UnionFind(N)

for _ in range(M):
  a, b = map(int, input().split())
  UF.unite(a-1, b-1)

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

print(ans)

### FIXED CODE ###

class UnionFind:
  def __init__(self, N):
    self.r = [-1]*N
  
  def root(self, x):
    if self.r[x] < 0:
      return x
    else:
      self.r[x] = self.root(self.r[x])
      return self.r[x]
  
  def unite(self, x, y):
    x = self.root(x)
    y = self.root(y)
    if x == y:
      return False
    else:
      if self.r[x] > self.r[y]:
        x, y = y, x
      self.r[x] += self.r[y]
      self.r[y] = x
      return True
    
  def size(self, x):
    return -1*self.r[self.root(x)]
  
  def print(self):
    print(self.r)


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

UF = UnionFind(N)

for _ in range(M):
  a, b = map(int, input().split())
  UF.unite(a-1, b-1)

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

print(ans)
import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2, gcd
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
import numpy as np
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

"""
lim = 2*10**5   #必要そうな階乗の限界を入力

#階乗#
fact = [1] * (lim+1)
for n in range(1, lim+1):
	fact[n] = n * fact[n-1] % mod

#階乗の逆元#
fact_inv = [1]*(lim+1)
fact_inv[lim] = pow(fact[lim], mod-2, mod)
for n in range(lim, 0, -1):
	fact_inv[n-1] = n*fact_inv[n]%mod

def C(n, r):
	return (fact[n]*fact_inv[r]%mod)*fact_inv[n-r]%mod

"""

N, K = MAP()
D = LIST()

while 1:
	if set(list(str(N))) & set(D) == set():
		print(N)
		break
	N += 1

### FIXED CODE ###

import sys, re
from collections import deque, defaultdict, Counter
from math import ceil, sqrt, hypot, factorial, pi, sin, cos, tan, asin, acos, atan, radians, degrees, log2
from itertools import accumulate, permutations, combinations, combinations_with_replacement, product, groupby
from operator import itemgetter, mul
from copy import deepcopy
from string import ascii_lowercase, ascii_uppercase, digits
from bisect import bisect, bisect_left
from heapq import heappush, heappop
from functools import reduce
def input(): return sys.stdin.readline().strip()
def INT(): return int(input())
def MAP(): return map(int, input().split())
def LIST(): return list(map(str, input().split()))
def ZIP(n): return zip(*(MAP() for _ in range(n)))
import numpy as np
sys.setrecursionlimit(10 ** 9)
INF = float('inf')
mod = 10 ** 9 + 7

"""
lim = 2*10**5   #必要そうな階乗の限界を入力

#階乗#
fact = [1] * (lim+1)
for n in range(1, lim+1):
	fact[n] = n * fact[n-1] % mod

#階乗の逆元#
fact_inv = [1]*(lim+1)
fact_inv[lim] = pow(fact[lim], mod-2, mod)
for n in range(lim, 0, -1):
	fact_inv[n-1] = n*fact_inv[n]%mod

def C(n, r):
	return (fact[n]*fact_inv[r]%mod)*fact_inv[n-r]%mod

"""

N, K = MAP()
D = LIST()

while 1:
	if set(list(str(N))) & set(D) == set():
		print(N)
		break
	N += 1
n = int(input())
a = list(map(int, input().split()))
count = 0
while True:
    if a[0]%2 == 0 and a[1]%2==0 and a[2]%2==0:
        a = map(i//2 for i in range(n))
        count += 1
    else:
         break
print(count)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
count = 0

while all(i % 2 == 0 for i in a):
    a = [j/2 for j in a]
    count += 1
print(count)
N = int(input())

if N == 1:
    print('Hello, World')
else:
    A, B = map(int, open(0).read().split())
    print(A+B)


### FIXED CODE ###

N = int(input())

if N == 1:
    print('Hello World')
else:
    A, B = map(int, [input() for i in range(2)])
    print(A+B)
class DoublyLinkedListNode:
    def __init__(self, num):
        self.num  = num
        self.next = None
        self.prev = None

    def setNext(self, node):
        self.next = node

    def setPrev(self, node):
        self.prev = node

    def getNum(self):
        return self.num

    def getNext(self):
        return self.next

    def getPrev(self):
        return self.prev

class DoublyLinkedList:
    def __init__(self):
        self.first = None
        self.last  = None

    def insert(self, x):
        node = DoublyLinkedListNode(x)

        if self.first == None:
            self.first = node
            self.last  = node
            return

        self.first.setPrev(node)
        node.setNext(self.first)

        self.first = node

    def delete(self, x):
        node = self.first

        while node != None:
            if node.getNum() == x:
                if id(node) == id(self.first):
                    self.deleteFirst()
                    break

                if id(node) == id(self.last):
                    self.deleteLast()
                    break

                pnode = node.getPrev()
                nnode = node.getNext()

                if pnode != None:
                    pnode.setNext(nnode)
                if nnode != None:
                    nnode.setPrev(pnode)

                break

            node = node.getNext()

    def deleteFirst(self):
        node = self.first.getNext()
        node.setPrev(None)
        self.first = node

    def deleteLast(self):
        node = self.last.getPrev()
        node.setNext(None)
        self.last = node

    def __iter__(self):
        self._it = self.first
        return self

    def __next__(self):
        node = self._it
        if node == None:
            raise StopIteration

        self._it = self._it.getNext()
        return node.getNum()

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

    lst = DoublyLinkedList()

    for _ in range(n):
        cmds = input().split()

        if 'insert' == cmds[0]:
            lst.insert(int(cmds[1]))
        if 'delete' == cmds[0]:
            lst.delete(int(cmds[1]))
        if 'deleteFirst' == cmds[0]:
            lst.deleteFirst()
        if 'deleteLast' == cmds[0]:
            lst.deleteLast()

    print(" ".join([str(x) for x in lst]))

if __name__ == '__main__':
    main()



### FIXED CODE ###

from collections import deque

def main():
    lst = deque()

    n = int(input())

    for _ in range(n):
        cmd = input().split()

        if 'insert' == cmd[0]:
            lst.appendleft(cmd[1])
        if 'delete' == cmd[0]:
            try:
                lst.remove(cmd[1])
            except:
                pass
        if 'deleteFirst' == cmd[0]:
            lst.popleft()
        if 'deleteLast' == cmd[0]:
            lst.pop()

    sep = ''
    for n in lst:
        print(sep+n, end='')
        sep = ' '
    print()

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

r = int(input())

a = r * r * math.pi
c = 2 * r * math.pi
print('%.6f %.6f' % (a, c))

### FIXED CODE ###

import math

r = float(input())

a = r * r * math.pi
c = 2 * r * math.pi
print('%.6f %.6f' % (a, c))
#!/usr/bin/env python3

MOD = 10 ** 9 + 7
IMAX = 70
JMAX = 10 ** 5

def dp(n):
    assert n <= JMAX
    dp = [0 for j in range(JMAX + 1)]
    dp[0] = 1
    for i in reversed(range(IMAX + 1)):
        d = 2 ** i
        for j in reversed(range(JMAX + 1)):
            if j - d >= 0:
                dp[j] += dp[j - d]
            if j - 2 * d >= 0:
                dp[j] += dp[j - 2 * d]
    return sum(dp[:n + 1])

def main():
    n = int(input())
    print(dp(n))

main()


### FIXED CODE ###

#!/usr/bin/env python3

from copy import deepcopy

MOD = 10 ** 9 + 7
IMAX = 200
JMAX = 2

def dp(n):
    dp = [0 for j in range(JMAX + 1)]
    dp[0] = 1
    for i in reversed(range(IMAX + 1)):
        pre = deepcopy(dp)
        dp[2] += pre[1]
        dp[2] += 2 * pre[2]
        d = ((1 << i) & n) >> i
        if d:
            dp[1] += pre[0]
            dp[2] += pre[1]
        else:
            dp[0] += pre[1]
        dp = take_mod(dp)
    return sum(dp) % MOD

def take_mod(dp):
    res = [x % MOD for x in dp]
    return res

def main():
    n = int(input())
    print(dp(n))

main()
r,g,b=map(int,input().split()))
ans=100*r+10*g+b

if ans % 4 == 0:
  print("YES")
else:
  print("NO")

### FIXED CODE ###

r,g,b=map(int,input().split())
ans=100*r+10*g+b

if ans % 4 == 0:
  print("YES")
else:
  print("NO")
n=int(input())
l=list(map(int,input().split()))
e=0
ans=0
x=0
g=0
for s in range(n):
    while x==g and e<n:
        x^=l[e]
        g+=l[e]
        e+=1
    if e==n and x==g:
        ans+=e-s
    else:
        ans+=e-s
        x^=l[e]
        g-=l[e]
        x^=l[s]
        g-=l[s]
print(ans)

### FIXED CODE ###

n=int(input())
l=list(map(int,input().split()))
e=0
ans=0
x=0
g=0
for s in range(n):
    while x==g and e<n:
        x^=l[e]
        g+=l[e]
        e+=1
    if e==n and x==g:
        ans+=e-s
    else:
        ans+=e-s-1
        x^=l[s]
        g-=l[s]
print(ans)