Harryxun/stf_run huggingface dataset:
# encoding:utf-8
import copy
import numpy as np
import random

nums = list(input())
nums = [int(i) for i in nums]

def make2digits(n):
    digits = []
    for i in range(3):
        if n % 2 == 1:
            digits.append(1)
        else:
            digits.append(0)
        n = n//2
    return digits

for i in range(8):
    count = nums[0]
    choices = make2digits(i)
    for j in range(len(choices)):
        if choices[j]==0:
            count = nums[j+1]
        else:
            count += nums[j+1]
    if count == 7:
        ans_choice = choices


plusminus = ["-","+"]
ans = ""
nums = [str(i) for i in nums]
for i in range(3):
    ans = ans + nums[i] + plusminus[ans_choice[i]]

ans = ans+nums[-1]+"=7"
print(ans)


### FIXED CODE ###

# encoding:utf-8
import copy
import numpy as np
import random

nums = list(input())
nums = [int(i) for i in nums]

def make2digits(n):
    digits = []
    for i in range(3):
        if n % 2 == 1:
            digits.append(1)
        else:
            digits.append(0)
        n = n//2
    return digits

for i in range(8):
    count = nums[0]
    choices = make2digits(i)
    # print(choices)
    for j in range(len(choices)):
        if choices[j]==0:
            count -= nums[j+1]
        else:
            count += nums[j+1]
    # print(count)
    if count == 7:
        ans_choice = choices
        break


plusminus = ["-","+"]
ans = ""
nums = [str(i) for i in nums]
for i in range(3):
    ans = ans + nums[i] + plusminus[ans_choice[i]]

ans = ans+nums[-1]+"=7"
print(ans)
test = input()
a, b, c = map(int, test.split())  # 変数a,b,cにそれぞれN、A、Bをint型にして入力する　 
x = [] 
for i in range(1,a+1):  # list型の変数xに１からNまでの要素を入れる
    x.append(i)   
len_x = len(x)  # リスト型の変数xの要素数を獲得  
d = 0  # リストの各行の和を入れるための変数 
f = []  # 各行がA以上B以下の要素を入れるための変数 
x = map(str, x)  # リストxの書く要素をstr型に変換  
for i in range(len_x):
     e = x[i]           # xのi番目の要素を抽出
     e = list(e)  # xのi番目の要素を一文字ずつのstr型としてリスト型の変数に入れる
     e = map(int, e)  # xのi番目の要素をint型に変換     
e_number = len(e)  # リスト型の変数eの要素数を取得     
d = 0              # 位の合計の判定用の変数     
for g in range(e_number):
    d += e[g]  # 位の合計     
    if b <= d <= c:  # 位の合計がA以上B以下ならリストfに要素を追加
         f.append(x[i]) answer = 0  # 条件位合う要素の合計を入れる変数 
f = map(int, f) for h in f:  # 要素に合う要素の合計     
answer += h print(answer)    


### FIXED CODE ###

# coding: utf-8
# Your code here!
#-*- coding: utf-8 -*-#
test = input()
a, b, c = map(int, test.split())  # 変数a,b,cにそれぞれN、A、Bをint型にして入力する　
x = []
e = []
for i in range(1,a+1):  # list型の変数xに１からNまでの要素を入れる
    x.append(i)
len_x = len(x)  # リスト型の変数xの要素数を獲得
d = 0  # リストの各行の和を入れるための変数
f = []  # 各行がA以上B以下の要素を入れるための変数
x = map(str, x) # リストxの各要素をstr型に変換
x = list(x)
e_number = 0
for i in range(len_x):
    e = x[i]           # xのi番目の要素を抽出
    e = list(e)  # xのi番目の要素を一文字ずつのstr型としてリスト型の変数に入れる
    e = map(int, e)# xのi番目の要素をint型に変換
    e = list(e)
    e_number = len(e)   # リスト型の変数eの要素数を取得
    d = 0              # 位の合計の判定用の変数
    for g in range(e_number):
        d += e[g-1]  # 位の合計
    if b <= d <= c:  # 位の合計がA以上B以下ならリストfに要素を追加
        f.append(x[i])
answer = 0  # 条件位合う要素の合計を入れる変数
f = map(int, f)
for h in f:
    answer += h  # 要素に合う要素の合計
print(answer)
if int(input())*int(input()) in [4,6,9]:
  print('No')
else:
  print('Yes')
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    
    '

### FIXED CODE ###

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

if A*B in [2,4,6]:
  print('No')
else:
  print('Yes')
def main():
    dic = {'A':'T', 'T':'A', 'G':'T', 'T':'G'}
    b = input()
    print(dic[b])
    
if __name__ == '__main__':
    main()


### FIXED CODE ###

def main():
    dic = {'A':'T', 'T':'A', 'G':'C', 'C':'G'}
    b = input()
    print(dic[b])
    
if __name__ == '__main__':
    main()
print((input()-2)*180)

### FIXED CODE ###

print((int(input())-2)*180)
a, b = map(int, input().split())
print(math.gcd(a, b))

### FIXED CODE ###

x, y = map(int, input().split())
while y > 0 :
    x, y = y, x % y
print(x)
s,w=map(int,input().split())
if s <= w:
  print("unsafe")
 else:
  print("safe")

### FIXED CODE ###

s,w=map(int,input().split())
if s <= w:
  print("unsafe")
else:
  print("safe")
k=input()
ans=[]
for i in range(k):
  ans.append("ACL")
 
print("".joint(ans))

### FIXED CODE ###

k = int(input())
ans=[]
for i in range(k):
  ans.append("ACL")

print("".join(ans))
N, Q = map(int, input().split())

v = [[] for i in range(N)]  #もともとの木構造
for i in range(N-1):
  a, b = map(int, input().split())
  #vのindexが頂点番号、各indexの要素が繋がっている要素を表す
  v[a-1].append(b-1) #頂点idが1から始まっているため0にずらす
  v[b-1].append(a-1)

f = [0] * N #足し算するもの
for i in range(Q):
  p, x = map(int, input().split())
  f[p-1] += x  #それぞれの頂点に足すべき項目をあらかじめ追加して整理

#print(v)
#print(f)

#再帰関数dfsの定義:終了条件はd[y]==0となったら
def dfs(x, d, s): # x:計算する頂点, d:計算了否配列(まだ1完了0), s:頂点xの値
  for y in v[x]:  #頂点xとつながる各頂点yの計算
    if d[y]:      #計算される頂点yが計算未了の場合
      s += f[y]   #頂点xの値sにf[y](頂点yの値)を足す
      ans[y] = s  #頂点yの値をsに確定
      d[y] = 0    #計算済に変更
      dfs(y,d,s)  #頂点yの下層についても再帰的に計算
      s -= f[y]   #頂点yの下層の計算が終わったのでsを頂点xの値に戻す

ans = [0] * N
d = [1] * N #全部未計算にセット
d[0] = 0 #0が"根" 0は計算済(※f[0]が答えだから)
ans[0] = f[0]
s = f[0]
dfs(0,d,s)
print(*ans) #*と配列でスペース区切りで表示

### FIXED CODE ###

import sys
input = sys.stdin.readline   #sys.std.readlineのほうが10倍速い
N, Q = map(int, input().split())
AB = [tuple(map(int, input().split())) for i in range(N-1)]
PX = [tuple(map(int, input().split())) for i in range(Q)]
es = [[] for _ in range(N)]  #グラフ配列

for a,b in AB:
  a -= 1
  b -= 1
  es[a].append(b)
  es[b].append(a)
ps = [0] * N   #処理配列(当該のものをプラスする)
for p,x in PX:
  ps[p-1] += x
  
#print(es)
#print(ps)

ans = [0] * N #回答配列
ans[0] = ps[0]
stack = [0]  #待ち配列
visited = [0] * N #訪れたかどうか配列、最初は0、訪れたら1
visited[0] = 1
while stack: #空であればFalse、中身が入ってればTrueを返す性質
  v = stack.pop()
  for i in es[v]:
    if visited[i]:
      continue
    visited[i] = 1
    ans[i] = ans[v] + ps[i]
    stack.append(i)
print(*ans)
import numpy as np
a, b = map(int, input().split())
if  b == 100:
    z = a*100 + b
elif b >= 10 and  b < 100:
    z = a*100 + b
elif b >= 0 and  b < 10:
    z = a*10 + b

e = np.sqrt(z)
f = float(e) - int(e)
if bool(f) == False:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

a, b = map(int, input().split())
if a * b % 2 == 0:
  print("Even")
else:
    print("Odd")
import sys

# 関数 solve は，もちろん，問題に応じて書き換える
def solve(n):
    if  a <= 8 and b <= 8 :
        return 'yay'
    else:
        return ':('

# ここから下は，入力・出力形式が同じであれば，変えなくて良い．
def readQuestion():
    line = sys.stdin.readline().rstrip()
    return int(line)

def main():
    n = readQuestion()
    answer = solve(n)
    print(answer)
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys

def solve(a, b):
    if  a <= 8 and b <= 8 :
        return 'Yay!'
    else:
        return ':('
    
def readQuestion():
    line = sys.stdin.readline().rstrip()
    [str_a, str_b] = line.split(' ')
    return (int(str_a), int(str_b))

def main():
    a, b = readQuestion()
    answer = solve(a, b)
    print(answer)
    
if __name__ == '__main__':
    main()
f,s=map(int,input.split())
if f==s:
    print('Yes')
elif :
    print('No')


### FIXED CODE ###

N,M = (int(i) for i in input().split())
if N==M: 
    print('Yes')
else:
    print('No')
X,K,D = map(int,input().split())
X = abs(X)
#0またがない
if X > K*D:
    ans = X - K*D
#0またぐ
else:
    while X >= 0 :
        X = X - D
        K -= 1
    if K % 2 == 0:
        ans = abs(X)
    else:
        ans = X+D

print(ans)

### FIXED CODE ###

S = input()
s = list(S)
if S == "RSR":
    print(1)
else:
    print(s.count('R'))
from fraction import gcd

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

p = [a[0]]
for i in range(1, n):
    p.append(gcd(p[i - 1], a[i]))

q = [a[-1]]
for i in range(n - 1):
    q.append(gcd(q[i], a[n - 2 - i]))
q = q[::-1]

res = 1
for i in range(n):
    if i - 1 < 0:
        res = max(res, q[i + 1])
    elif i + 1 >= n:
        res = max(res, p[i - 1])
    else:
        res = max(res, gcd(p[i - 1], q[i + 1]))

print(res)


### FIXED CODE ###

from fractions import gcd

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

p = [a[0]]
for i in range(1, n):
    p.append(gcd(p[i - 1], a[i]))

q = [a[-1]]
for i in range(n - 1):
    q.append(gcd(q[i], a[n - 2 - i]))
q = q[::-1]

res = 1
for i in range(n):
    if i - 1 < 0:
        res = max(res, q[i + 1])
    elif i + 1 >= n:
        res = max(res, p[i - 1])
    else:
        res = max(res, gcd(p[i - 1], q[i + 1]))

print(res)
import sys

stdin = sys.stdin

read_int = lambda : list(map(int,stdin.readline().split()))

N,M = read_int()

price_howmany = {}
price_list = []
for i in range(N):
    tmp = read_int()
    price_list.append(tmp[0])
    if tmp[0] in price_howmany:
        price_howmany[tmp[0]] += tmp[1]
    else:
        price_howmany[tmp[0]] = tmp[1]
price_list.sort()

def solve():
    price = 0
    global M
    for low_price in price_list:
        many = min(M,price_howmany.pop(low_price))
        price += many * low_price
        M -= many
        if M == 0: break
    print(price)

if __name__ == "__main__":
    solve()

### FIXED CODE ###

# from collections import defaultdict
# N,M = list(map(int,input().split()))
# price_howmany = defaultdict(int)
import sys

stdin = sys.stdin

read_int = lambda : list(map(int,stdin.readline().split()))

N,M = read_int()
price_howmany = {}
# price_list = []

price_set = set()
for _ in range(N):
    tmp = read_int()
    # if tmp[0] not in price_set:
        # price_list.append(tmp[0])
    price_set.add(tmp[0])
    if tmp[0] in price_howmany:
        price_howmany[tmp[0]] += tmp[1]
    else:
        price_howmany[tmp[0]] = tmp[1]
# price_list.sort(reverse=True)
price_list = sorted(list(price_set))

# price_howmany = dict(price_howmany)

def solve():
    price = 0
    global M
    # while M > 0:
        # low_price = min(price_howmany.keys())
        # low_price = price_list.pop()
        # many = min(M,price_howmany.pop(low_price))
        # price += many * low_price
        # M -= many
    for low_price in price_list:
        many = min(M,price_howmany.pop(low_price))
        price += many * low_price
        M -= many
        if M == 0: break
    print(price)

if __name__ == "__main__":
    solve()
d = input()
a = input().split()
r = 0
for i in a:
    r += 1 / i
print(1/r)

### FIXED CODE ###

d = input()
a = input().split()
r = 0
for i in a:
    r += 1 / int(i)
print(1 / r)
K = int(input())
N = 50
while not K % N:
    N -= 1
ans = [K // N + N] * (K % N) + [K // N + N - K % N - 1] * (N - K % N)
print(N)
print(*ans)

### FIXED CODE ###

K = int(input())

N = 50
ans = [K // N + N] * (K % N) + [K // N + N - K % N - 1] * (N - K % N)
print(N)
print(*ans)
l=[input() for i in range(5)]
a=[0, 0, 0, 0, "9"]

for i in range(5):
  if int(a[4][-1]) >= int(l[i][-1]) and not(int(l[i][-1]) == 0):
      a[4] = l[i]

if a[4] is 0:
  a[4] = l[0]

l.remove(a[4])
l = [int(i) for i in l]
l.sort()
for j in range(4):
  while(not(int(l[j]) % 10 is 0)):
    l[j]+=1
  a[j] = int(l[j])
  
a[4] = int(a[4])
print(sum(a))


### FIXED CODE ###

l=[input() for i in range(5)]
a=[0, 0, 0, 0, "9"]

for i in range(5):
  if int(a[4][-1]) >= int(l[i][-1]) and not(int(l[i][-1]) == 0):
      a[4] = l[i]

if a[4] is "9":
  a[4] = l[0]

l.remove(a[4])
l = [int(i) for i in l]
l.sort()
for j in range(4):
  while(not(int(l[j]) % 10 is 0)):
    l[j]+=1
  a[j] = int(l[j])
  
a[4] = int(a[4])
print(sum(a))
n,m = map(int,input().split())
a = []
for i in range(m):
    b = int(input())
    a.append(b)
d = [0 for i in range(n+1)]
d[0] = 0
d[1] = 1
d[2] = 2
for i in range(3,n+1):
    d[i] = d[i-1] + d[i-2]
ans = 1
if a[0] == 1:
    ans = 1
else:
    ans = ans*d[a[0]-1]%mod
for i in range(m-1):
    ans = ans*d[a[i+1]-a[i]-2]%mod
ans = ans*d[n-a[m-1]-1]%mod
print(ans)

### FIXED CODE ###

n,m = map(int,input().split())
a = []
mod = 10**9+7
d = [0 for i in range(n+1)]
d[0] = 1
d[1] = 1
if n >1 :
    d[2] = 2
for i in range(3,n+1):
    d[i] = d[i-1] + d[i-2]
if m != 0:
    d.append(0)
    for i in range(m):
        b = int(input())
        a.append(b)
    ans = 1
    if a[0] == 1:
        ans = 1
    else:
        ans = ans*d[a[0]-1]%mod
    for i in range(m-1):
        ans = ans*d[a[i+1]-a[i]-2]%mod
    ans = ans*d[n-a[m-1]-1]%mod
else:
    ans = d[n]%mod
print(ans)
a=list(map(int,input().split()))
a=sorted(a)

dist1=a[2]-a[0]
dist2=a[2]-a[1]

if (dist1%2)==0 and (dist2%2)==0:
  ans=(dist1+dist2)//2
  print(ans)
  
elif (dist1%2)==1 and (dist2%2)==1:
  ans=(dist1+dist2)//2
  print(ans)
  
elif (dist1%2)==2 and (dist2%2)==1:
  ans(dist1//2)+(dist2+1)//2
  print(ans)
  
else:
  ans(dist2//2)+(dist1+1)//2
  print(ans)

### FIXED CODE ###

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

dist1=a[2]-a[0]
dist2=a[2]-a[1]

if (dist1%2)==0 and (dist2%2)==0:
  ans=(dist1+dist2)//2
  print(ans)
  
elif (dist1%2)==1 and (dist2%2)==1:
  ans=(dist1+dist2)//2
  print(ans)
  
elif (dist1%2)==0 and (dist2%2)==1:
  ans=(dist1//2)+(dist2+1)//2
  print(ans+1)
  
else:
  ans=(dist2//2)+(dist1+1)//2
  print(ans+1)
r=int(input)

print(r**2)


### FIXED CODE ###

r=int(input())

print(r**2)
N,M = map(int,input().split())
A = map(int,input().split())

s = sum(A)
if N-s<0:
    print(-1)
else:
    print(N-s)

### FIXED CODE ###

import math
R = int(input())
p = math.pi
print(2*R*p)
def countingsort(a,k):
    c=[0]*(k+1)
    n=len(a)
    for i in a:
        c[i]+=1
    for i in range(1,k+1):
        c[i]=c[i]+c[i-1]
    b=[0]*n
    for i in range(n-1,-1,-1):
        b[c[a[i]]-1]=a[i]
        c[a[i]]-=1
    return b
o=int(input())
a=list(map(int,input().split()))
q=max(a)
ret=countingsort(a,q)
for i in range(n):
    if i!=n-1:
        print(ret[i],end=" ")
    else:
        print(ret[i])


### FIXED CODE ###

def countingsort(a,k):
    c=[0]*(k+1)
    n=len(a)
    for i in a:
        c[i]+=1
    for i in range(1,k+1):
        c[i]=c[i]+c[i-1]
    b=[0]*n
    for i in range(n-1,-1,-1):
        b[c[a[i]]-1]=a[i]
        c[a[i]]-=1
    return b
o=int(input())
a=list(map(int,input().split()))
q=max(a)
ret=countingsort(a,q)
for i in range(o):
    if i!=o-1:
        print(ret[i],end=" ")
    else:
        print(ret[i])
a,b,k=map(int,input().split())
l=list(range(a,b+1))
l=l[:k]+l[-k:]
l=set(l)
l=sorted(list(l))
print(*l,sep='\n')

### FIXED CODE ###

A, B, K = map(int, input().split())
num_range = range(A, B + 1)
for i in sorted(set(num_range[:K]) | set(num_range[-K:])):
    print(i)
def PrimeNumber(N):
    ans = list(range(2, N + 1))
    i = 0
    while ans[i] < N ** 0.5 + 1:
        j = 2
        temp = ans[i]
        while temp * j <= ans[-1]:
            if temp * j in ans:
                ans.remove(temp * j)
            j += 1
        i += 1
    return ans

N=int(input())

mod=10**9+7
PN=PrimeNumber(N)
P=[0]*(N+1)

for i in range(2,N+1):
    temp=i
    for j in PN:
        cnt=0
        while temp%j==0:
            cnt+=1
            temp=temp//j
        P[j]+=cnt

ans=1

for i in range(1,N+1):
    if P[i]!=0:
        ans=(ans*(P[i]+1))%mod
print(ans)



### FIXED CODE ###

def PrimeNumber(N):
    if N==2:
        ans=[2]
        return ans
    ans = list(range(2, N + 1))
    i = 0
    while ans[i] < N ** 0.5 + 1:
        j = 2
        temp = ans[i]
        while temp * j <= ans[-1]:
            if temp * j in ans:
                ans.remove(temp * j)
            j += 1
        i += 1
    return ans

N=int(input())

if N==1:
    print(1)
    exit()

mod=10**9+7
PN=PrimeNumber(N)
P=[0]*(N+1)

for i in range(2,N+1):
    temp=i
    for j in PN:
        if temp<j:
            break
        cnt=0
        while temp%j==0:
            cnt+=1
            temp=temp//j
        P[j]+=cnt

ans=1

for i in range(1,N+1):
    if P[i]!=0:
        ans=(ans*(P[i]+1))%mod
print(ans)
from sys import stdin
stdin = open('sample.txt')


def main():
    N = int(stdin.readline().rstrip())

    if N == 0:
        print('0')
        return

    ans = ''
    base = 2
    while N != 1:
        ans = str(abs(N % base)) + ans
        N = N // base
        N = -1 * N
    print('1' + ans)


if __name__ == '__main__':
    main()


### FIXED CODE ###

from sys import stdin


def main():
    N = int(stdin.readline().rstrip())

    if N == 0:
        print('0')
        return

    ans = ''
    base = 2
    while N != 1:
        ans = str(abs(N % base)) + ans
        N = N // base
        N = -1 * N
    print('1' + ans)


if __name__ == '__main__':
    main()
DEBUG = False

N, M, X = map(int, input().split())
A = []
C = []
for _ in range(N):
    CA = list(map(int, input().split()))
    C.append(CA[0])
    A.append(CA[1::])

if DEBUG:
    print(A)
    print(C)

max_money = 10**5 * N
ans_money = float('inf')
# ans_algorythm = None
for i in range(2**N):
    bit = bin(i)[2::]
    bit = bit.zfill(M)
    if DEBUG:
        print("i: {}, bit: {}".format(i, bit))
    tmp_money = 0
    tmp_algorythm = [0] * M
    for j, b in enumerate(bit):
        if b == '1':
            tmp_money += C[j]
            for k, c in enumerate(A[j]):
                tmp_algorythm[k] += c
    if DEBUG:
        print("tmp_money: {}, tmp_algorythm: {}".format(tmp_money, tmp_algorythm))
    if len(list(filter(lambda x: x < X, tmp_algorythm))) == 0:
        ans_money = min(tmp_money, ans_money)
        if DEBUG:
            print("ans_money: {}".format(ans_money))
        # break

if ans_money == max_money:
    print(-1)
else:
    print(ans_money)


### FIXED CODE ###

DEBUG = False

N, M, X = map(int, input().split())
A = []
C = []
for _ in range(N):
    CA = list(map(int, input().split()))
    C.append(CA[0])
    A.append(CA[1::])

if DEBUG:
    print(A)
    print(C)

max_money = 10**5 * N + 1
ans_money = max_money
# ans_algorythm = None
for i in range(2**N):
    bit = bin(i)[2::]
    bit = bit.zfill(N)
    if DEBUG:
        print("i: {}, bit: {}".format(i, bit))
    tmp_money = 0
    tmp_algorythm = [0] * M
    for j, b in enumerate(bit):
        if b == '1':
            tmp_money += C[j]
            for k, c in enumerate(A[j]):
                tmp_algorythm[k] += c
    if DEBUG:
        print("tmp_money: {}, tmp_algorythm: {}".format(tmp_money, tmp_algorythm))
    if len(list(filter(lambda x: x < X, tmp_algorythm))) == 0:
        ans_money = min(tmp_money, ans_money)
        if DEBUG:
            print("ans_money: {}".format(ans_money))
        # break

if ans_money == max_money:
    print(-1)
else:
    print(ans_money)
b = input()
print('T' if b == 'A')
print('A' if b == 'T')
print('C' if b == 'G')
print('G' if b == 'C')

### FIXED CODE ###

b = input()
if b == 'A':
  print('T')
elif b == 'T':
  print('A')
elif b == 'C':
  print('G')
else:
  print('C')
a, b = map(int, input().split())
d = a // b
r = a % b
f = a / b
print(???{0:d} {1:d} {2:f}???.format(d, r, f))

### FIXED CODE ###

a, b = map(int, input().split())
d = a // b
r = a % b
f = a / b
print('{0:d} {1:d} {2:f}'.format(d, r, f))
import math
from functools import reduce

#２つでの再酥油公倍数
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)


def main():
    n = int(input())
    array = list(map(int, input().split()))
    lcm = lcm_list(array)

    total = 0
    for i,num in enumerate(array):
        total += lcm / num
    print(int(total%(10**9+7)))

if __name__ == '__main__':
    main()

### FIXED CODE ###

def main():
    import fractions
    n = int(input())
    array = list(map(int, input().split()))
    lcm = array[0]
    for i in range(1, n):
        lcm = lcm * array[i] // fractions.gcd(lcm, array[i])

    total = 0
    for i,num in enumerate(array):
        total += lcm // num
    print(int(total%(10**9+7)))

if __name__ == '__main__':
    main()
n=int(input())
s=input()
for i in s:
    i=chr()
ans="".join(s)
print(ans)

### FIXED CODE ###

n=int(input())
s=input()
ans=[]
for i in s:
    ans.append(chr((ord(i)-65+n)%26+65))
ans="".join(ans)
print(ans)
n, k, sp_p, n_p = map(int, input().split())
sum = 0

for i in k:
    sum += sp_p

for j in n-k:
    sum += n_p

print(sum)

### FIXED CODE ###

all_days=int(input())
days1=int(input())
sp_p=int(input())
n_p=int(input())
ans = 0

if all_days <= days1:
    ans = sp_p * all_days
else:
    ans = days1 * sp_p + (all_days-days1) * n_p

print(ans)
A, B, C, D = MI()

print(max(A * B, C * D))

### FIXED CODE ###

def INT():
    return int(input())

def MI():
    return map(int, input().split())

def LI():
    return list(map(int, input().split()))

A, B, C, D = MI()

print(max(A * B, C * D))
n = int(input())
x,y,h = map(int,input().split())
if n == 1:
    print(x,y,h)
    exit()
lst = [[] for _ in range(n)]
for i in range(101):
    for j in range(101):
        lst[0].append((i,j,h+abs(i-x)+abs(j-y)))
for i in range(n-1):
    xi,yi,hi = map(int,input().split())
    for x,y,h in lst[i]:
        if abs(x-xi)+abs(y-yi)+hi == h:
            lst[i+1].append((x,y,h))
print(*lst[n-1][0])

### FIXED CODE ###

n = int(input())
data = []
for i in range(n):
    xi,yi,hi = map(int,input().split())
    data.append((xi,yi,hi))
lst = [[] for _ in range(n)]
data.sort(key = lambda x:x[2],reverse = True)
x,y,h = data[0]
for i in range(101):
    for j in range(101):
        lst[0].append((i,j,h+abs(i-x)+abs(j-y)))
for i in range(1,n):
    xi,yi,hi = data[i]
    if hi > 0:
        for x,y,h in lst[i-1]:
            if abs(x-xi)+abs(y-yi)+hi == h:
                lst[i].append((x,y,h))
    else:
        for x,y,h in lst[i-1]:
            if abs(x-xi)+abs(y-yi) >= h:
                lst[i].append((x,y,h))
print(*lst[n-1][0])
from collections import deque

# print('input >>')
N, M = map(int,(input().split()))
ABs = [map(int,(input().split())) for _ in range(M)]

INF = 10 ** 10
ds = [INF] * (N+1)
marks = [0] * (N+1)

nodes = [None] * (N+1)

for AB in ABs:
    A, B = AB
    if nodes[A] is None:
        nodes[A] = []
    nodes[A].append(B)

    B, A = A, B
    if nodes[A] is None:
        nodes[A] = []
    nodes[A].append(B)

# print(nodes)

queue = deque([1])
visited = [0] * (N+1)
visited[1] = 1

# d = 0
# ds = [INF] * (N+1)
marks = [0] * (N+1)
parent = 1

while len(queue) > 0:
    p = queue.popleft()
    # print(p)
    # parent, node = p[0], p[1]
    # visited[node] = 1
    # marks[node] = parent
    for n in nodes[p]:
        if visited[n] == 0:
            visited[n] = 1
            marks[n] = p

print('Yes')
for mark in marks[2:]:
    print(mark)


### FIXED CODE ###

# print('input >>')
N = input()
last = int(N[-1])

# print('-----output-----')
if last == 2 or last == 4 or last == 5 or last == 7 or last == 9:
    print('hon')
elif last == 0 or last == 1 or last == 6 or last == 8:
    print('pon')
elif last == 3:
    print('bon')
N = input()
N = int(N)
s = [[ int(i) for i in input().split()] for i in range(N)]
hoge = []
import collections

for i in s:
    for k in s:
        if k != i:
            hoge1 = (i[0] - k[0],i[1] - k[1])
            if hoge1[0] < 0:
                hoge1 = (k[0] - i[0],k[1] - i[1])
            hoge.append(hoge1)

c = collections.Counter(hoge)

print(N - c.most_common()[0][1] // 2)

### FIXED CODE ###

N = input()
N = int(N)
s = [[ int(i) for i in input().split()] for i in range(N)]
hoge = []
import collections

for i in s:
    for k in s:
        if k != i:
            hoge1 = (i[0] - k[0],i[1] - k[1])
            if hoge1[0] <= 0:
                hoge1 = (k[0] - i[0],k[1] - i[1])
            if hoge1[0] == 0 and hoge1[1] <= 0:
                hoge1 = (k[0] - i[0],i[1] - k[1])
            hoge.append(hoge1)
if len(hoge) >= 1:
	c = collections.Counter(hoge)
	print(N - c.most_common()[0][1] // 2)
else:
    print(1)
import sys

X,N = list(map(int,input().split()))
P = list(map(int,input().split()))

P_n = [i for i in range(1,101,1) if i not in P]
abs_value = [abs(X-P_n[j]) for j in range(len(P_n))]
min_abs = min(abs_value)

for k in range(len(P_n)):
    if abs_value[k] == min_abs:
        print(P_n[k])
        sys.exit()

### FIXED CODE ###

X = [int(x) for x in input().split()]

print(X.index(0)+1)
n=int(input())
if n%2=0:
  print(0.5)
elif:
  print ((n//2)/n)

### FIXED CODE ###

n=int(input())
if n%2==0:
  print (0.5)
else:
  print (1-((n//2)/n))