Harryxun/stf_run huggingface dataset:
import math as M
def R(A): return (A[0]**2+A[1]**2)**.5
def I(i): return [map(int,raw_input().split()) for _ in [0]*i]
def C(a,b): return a>b or abs(a-b)<1e-6
def f(e1):
  tx,ty,sx,sy=e1
  x=[]
  for e2 in WP:
    wx,wy,r=e2
    wt=[tx-wx,ty-wy]; rwt=R(wt)
    sw=[wx-sx,wy-sy]; rsw=R(sw)
    st=[tx-sx,ty-sy]; rst=R(st)
    F=[rwt<r,rsw<r]
    if rst==0: c=1
    elif F==[1,1]: c=1 # 両方壁の中
    elif F==[1,0] or F==[0,1]: c=0 # 片方が壁の中
    elif F==[0,0]: #両方壁の外
      a=M.pi/2-M.acos(r/rsw)
      tmp=(sw[0]*st[0]+sw[1]*st[1])/rsw/rst
      if abs(abs(tmp)-1)<1e-6: tmp=1
      b=M.acos(tmp)
      if C(a,b) and C(rst**2,rsw**2-r**2): c=0
      else: c=1
    x.append(c)
  return all(x)

while 1:
  n=input()
  if n==0: break
  WP=I(n)
  P=I(input())
  for e in P: print ["Safe","Danger"][f(e)]

### FIXED CODE ###

import math as M
def R(A): return (A[0]**2+A[1]**2)**.5
def I(i): return [map(int,raw_input().split()) for _ in [0]*i]
def C(a,b): return a>b or abs(a-b)<1e-6
def f(e1):
  tx,ty,sx,sy=e1
  x=[]
  st=[tx-sx,ty-sy]; rst=R(st)
  for e2 in WP:
    wx,wy,r=e2
    wt=[tx-wx,ty-wy]; rwt=R(wt)
    sw=[wx-sx,wy-sy]; rsw=R(sw)
    F=[rwt<r,rsw<r]
    if F==[1,0] or F==[0,1]: return 0
    elif F==[0,0]:
      a=M.pi/2-M.acos(r/rsw)
      b=M.acos(round((sw[0]*st[0]+sw[1]*st[1])/rsw/rst,4))
      if C(a,b) and C(rst**2,rsw**2-r**2): return 0
  return 1

while 1:
  n=input()
  if n==0: break
  WP=I(n)
  P=I(input())
  for e in P: print ["Safe","Danger"][f(e)]
n=int(input())
m=n**(1/2)//1+1
l=[]
for i in range(m+1)[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
  if len(l)==3:
    break
print(min(l))

### FIXED CODE ###

n=int(input())
m=int((n**(1/2))//1+1)
l=[]
for i in list(range(m+1))[:0:-1]:
  if n%i==0:
    l.append(max(len(str(i)),len(str(n//i))))
  if len(l)==3:
    break
print(min(l))
def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    plus = [A[i] for i in range(N) if A[i] >= 0]
    minus = [A[i] for i in range(N) if A[i] < 0]

    ans = 1

    id = 0
    id2 = 0
    P = len(plus)
    M = len(minus)
    plus.sort(reverse=True)

    mod = 10**9 + 7

    if P == 0:
        if K % 2 == 0:
            minus.sort()
            for i in range(K):
                ans *= minus[i]
                ans %= mod
        else:
            minus.sort(reverse=True)
            for i in range(K):
                ans *= minus[i]
                ans %= mod

    elif M == 0:
        for i in range(K):
            ans *= plus[i]
            ans %= mod

    else:

        p = P // 2
        m = M // 2
        if K > (p+m)*2 and (K % 2 == 1 and P % 2 == 0):  # 絶対値が小さい方から貪欲
            A.sort(key=lambda x: abs(x))
            for i in range(K):
                ans *= A[i]
                ans %= mod

        else:  # 絶対値が大きい方から貪欲
            minus.sort()
            pp = [plus[i]*plus[i+1] for i in range(M // 2)]
            mm = [minus[i] * minus[i+1] for i in range(P//2)]

            id = 0
            id2 = 0

            pp.sort(reverse=True)
            mm.sort(reverse=True)

            for i in range(K // 2):
                if id == p:
                    ans *= mm[id2]
                    id2 += 1
                elif id2 == m:
                    ans *= pp[id]
                    id += 1

                elif pp[id] >= mm[id2]:
                    ans *= pp[id]
                    id += 1
                else:
                    ans *= mm[id2]
                    id2 += 1

                ans %= mod

            if K % 2 == 1:
                ans *= plus[id * 2]

    print(ans % mod)


main()


### FIXED CODE ###

def main():
    N, K = map(int, input().split())
    A = list(map(int, input().split()))

    plus = [A[i] for i in range(N) if A[i] >= 0]
    minus = [A[i] for i in range(N) if A[i] < 0]

    ans = 1

    P = len(plus)
    M = len(minus)
    plus.sort(reverse=True)
    minus.sort()
    mod = 10**9 + 7

    if N == K:
        for x in A:
            ans *= x
            ans %= mod
    elif P == 0:
        if K % 2 == 1:
            minus.sort(reverse=True)
        for i in range(K):
            ans *= minus[i]
            ans %= mod
    else:  # 必ず正の値が作れる？ 1つ以上余るので、偶奇は選べるはず
        id = 0
        if K % 2 == 1:
            ans = plus[0]
            id = 1
            P -= 1
            K -= 1
        pp = [plus[i] * plus[i+1] for i in range(id, P-1+id, 2)]
        mm = [minus[i] * minus[i+1] for i in range(0, M-1, 2)]

        id = 0
        id2 = 0

        for i in range(K // 2):
            if id < P // 2 and (id2 >= M // 2 or pp[id] >= mm[id2]):
                ans *= pp[id]
                id += 1
            else:
                ans *= mm[id2]
                id2 += 1
            ans %= mod

    print(ans % mod)


main()
d = dict(zip( ['MON', 'TUE', 'WED', 'THUR', 'FRI', 'SAT', 'SUN'], '6543217'))
s = input()
print(d[s])

### FIXED CODE ###

d = dict(zip( ['MON', 'TUE', 'WED', 'THU', 'FRI', 'SAT', 'SUN'], '6543217'))
s = input()
print(d[s])
import math
import collections

def gcd(x,y)
	if y==0: return x
  return gcd(y,x%y)

gc_value = gcd(A,B)
N = gc_value

# N : 素因数分解
prime_factor = []
for i in range(2,int(math.sqrt(N))+1):
  while N%i == 0:
    prime_factor.append(i)
    N/=i
    
if N > 1:
  prime_factor.append(N)
  
for i in range(K-1):
  gc_value/=prime_factor[i]

print(int(gc_value))  
  


### FIXED CODE ###

import sys

A,B,K = [int(s) for s in input().split()]

cnt = 0

N = min(A,B) 

for i in range(N,0,-1):
  if A % i == 0 and B % i == 0:
    cnt += 1
  if cnt == K:
    print(i)
    sys.exit()
#計数ソート
n = int(input())
a = list(map(int, input().split()))

def countSort(a):
    N = max(a)
    c = [0]*(N+2)
    b = [0]*len(a)
    for i in a:
        c[i] += 1
    for i in range(1,len(c)):
        c[i] += c[i-1]
        
    for i in a:
        b[c[i]-1] = i
        c[i] -= 1
    print(b)

countSort(*a)


### FIXED CODE ###

#計数ソート
n = int(input())
a = list(map(int, input().split()))

def countSort(a):
    N = max(a)
    c = [0]*(N+2)
    b = [0]*len(a)
    for i in a:
        c[i] += 1
    for i in range(1,len(c)):
        c[i] += c[i-1]
        
    for i in a:
        b[c[i]-1] = i
        c[i] -= 1
    print(*b)

countSort(a)
import numpy as np

N,K=map(int,input().split())
h=list(map(int,input().split()))
# N,K=4,150
# h=[150, 140, 100, 200]

harry=np.array(h)
ans=np.where(harry>=K)

print(ans[0][1])


# import sys
# print(sys.version_info)

### FIXED CODE ###

import numpy as np

N,K=map(int,input().split())
h=list(map(int,input().split()))
# N,K=4,150
# h=[150, 140, 100, 200]

harry=np.array(h)
ans=np.count_nonzero(harry>=K)

print(ans)


# import sys
# print(sys.version_info)
import sys
sys.setrecursionlimit(10**7)
from collections import defaultdict,deque
import bisect
input = sys.stdin.readline
N = int(input())
a = list(map(int,input().split()))
g = defaultdict(list)
for i in range(N-1):
    u, v = map(int,input().split())
    g[u].append(v)
    g[v].append(u)

dq = deque([1])
euler = [1]
visited = [False]*(N+1)

inf = 10**10
l = [inf] * (N+1)


lis = [0] * (N+1)
lis[1] = 1

def f(v,l):
    if visited[v]:
        return
    visited[v] = True
    i = bisect.bisect(l,a[v-1])
    l[i] = a[v-1]
    lis[v] = l.index(inf)
    for nv in g[v]:
        if not visited[nv]:
            f(nv,l[:])

l = [inf] * (N+1)
l[0] = a[0]
f(1,l)

for i in range(1,N+1):
    print(lis[i]-1)







### FIXED CODE ###

import sys
sys.setrecursionlimit(10**9)
from collections import defaultdict,deque
import bisect
input = sys.stdin.readline

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

g = defaultdict(list)
for i in range(N-1):
    u, v = map(int,input().split())
    g[u].append(v)
    g[v].append(u)

def eulerTour(g,s):
    n = len(g)
    dq = [s]
    ls = [-1]*(n+1)
    rs = [-1]*(n+1)
    index = []
    visited = [False]*(n+1)
    def dfs(v):
        visited[v] = True
        ls[v] = len(index)
        index.append(v)
        for nv in g[v]:
            if not visited[nv]:
                dfs(nv)
        rs[v] = len(index)
        index.append(v)
    dfs(s)
    return ls,rs,index

ls,rs,index = eulerTour(g,1)
dq = deque([1])
visited = [False]*(N+1)

inf = 10**10
l = [inf] * (N+1)

ans = [0] * (N+1)
ans[1] = 1

visited = [False]*(N+1)
rollback = []

k = 1
for v in index:
    if visited[v]:
        i, pa = rollback.pop()
        l[i] = pa
        if pa == inf:
            k -= 1
    else:
        A = a[v-1]
        i = bisect.bisect_left(l,A)
        rollback.append((i,l[i]))
        if k <= i:
            k += 1
        l[i] = A
        #ans[v] = l.index(inf)
        ans[v] = k
        visited[v] = True


for i in range(1,N+1):
    print(ans[i])
import itertools
h, w = map(int, input().split())
a = [list(map(int, input().split())) for i in range(h)]
s = []
for i, j in itertools.product(range(h), range(w - 1)):
  if a[i][j] % 2 == 1:
    s.append((i + 1, j + 1, i + 1, j + 2))
    a[i][j] -= 1
    a[i][j + 1] += 1
for i in range(h - 1):
  if a[i][j] % 2 == 1:
    s.append((i + 1, j + 1, i + 2, j + 1))
    a[i][j] -= 1
    a[i + 1][j] += 1
print(len(s))
for l in s:
  print(*l)


### FIXED CODE ###

import itertools
h, w = map(int, input().split())
a = [list(map(int, input().split())) for i in range(h)]
s = []
for i, j in itertools.product(range(h), range(w - 1)):
  if a[i][j] % 2 == 1:
    s.append((i + 1, j + 1, i + 1, j + 2))
    a[i][j] -= 1
    a[i][j + 1] += 1
for i in range(h - 1):
  if a[i][w - 1] % 2 == 1:
    s.append((i + 1, w, i + 2, w))
    a[i][w - 1] -= 1
    a[i + 1][w - 1] += 1
print(len(s))
for l in s:
  print(*l)
h,w=map(int,input().split())
mass=[]
f=0
for i in range(0,h):
    mass.append(list(input()))
for i in range(h):
    if f==0:
        for j in range(w):
            if i!=h and j!=w:
                if mass[i][j]=="#" and mass[i][j]!=mass[i][j+1] and mass[i][j]!=mass[i+1][j]:
                    f=1
                    break
            elif i==h:
                if mass[i][j]=="#" and mass[i][j]!=mass[i][j+1]:
                    f=1
                    break
            else:
                if mass[i][j]=="#" and mass[i][j]!=mass[i+1][j]:
                    f=1
                    break
if f==0:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

h,w=map(int,input().split())
mass=[]
f=0
frame=[["."]*(w+2) for i in range(h+2)]
for i in range(h):
    mass.append(list(input()))
for i in range(h):
    for j in range(w):
        frame[i+1][j+1]=mass[i][j]
for i in range(1,h):
    if f==0:
        for j in range(1,w):
            if frame[i][j]=="#" and frame[i][j]!=frame[i][j+1] and frame[i][j]!=frame[i+1][j] and frame[i][j]!=frame[i][j-1] and frame[i][j]!=frame[i-1][j]:
                    f=1
                    break
if f==0:
    print("Yes")
else:
    print("No")
l,n=map(int,input().split())
li=[input() for i in range(n)]

li.sort()
"""
for st in li :
  s += st
print(s)
"""
print(*li,sep="")

### FIXED CODE ###

n,l=map(int,input().split())
li=[input() for i in range(n)]
ans=sorted(li)
"""
for st in li :
  s += st
print(s)
"""
print(*ans,sep="")
s=input()
n=len(s)
ans=[]
count=0
t= [0]*(n+1)
for i in range(n):
  if s[i]=="<":
    s[i+1]=s[i]+1
  else:
    s[i+1]=0
count=0
for i in range(n-1,-1,-1):
  if s[i]==">":
    s[i-1]=max(s[i]+1,s[i-1])
print(sum(ans))
  
  

### FIXED CODE ###

import collections
S = input()

s = list(S.split("><"))
ans = 0
for i in range(len(s)):
    table = collections.defaultdict(int)
    for y in s[i]:
        table[y] += 1

    if i == 0 and len(table) != 0:
        table["<"] -= 1
    if i == len(s)-1 and len(table) != 0:
        table[">"] -= 1
    table = list(table.values())
    if len(table) == 2:
        table.sort()
        ans += max((table[1]+1)*(table[1]+2) // 2, 0)
        ans += max((table[0]+1)*table[0] // 2, 0)

    elif len(table) == 1:
        ans += max((table[0]+1)*(table[0]+2) // 2, 0)
    else:
        ans += 1
print(ans)
def snuke_the_wizard(N: int, Q: int, s: str, queries: list)->int:
    l, r = -1, N
    for t, d in reversed(queries):
        if d == 'R':
            if s[r-1] == t:
                r -= 1
            if 0 <= l and s[l] == t:
                l -= 1
        else:
            if s[l+1] == t:
                l += 1
            if r < N and s[r] == t:
                r += 1
    return r - l - 1 if l < r else 0


if __name__ == "__main__":
    Q = 0
    N, Q = map(int, input().split())
    s = input()
    queries = [tuple(input().split()) for _ in range(Q)]
    ans = snuke_the_wizard(N, Q, s, queries)
    print(ans)


### FIXED CODE ###

def snuke_the_wizard(N: int, Q: int, s: str, queries: list)->int:
    l, r = -1, N
    for t, d in reversed(queries):
        if d == 'R':
            if 0 <= r-1 and s[r-1] == t:
                r -= 1
            if 0 <= l and s[l] == t:
                l -= 1
        else:
            if l + 1 < N and s[l+1] == t:
                l += 1
            if r < N and s[r] == t:
                r += 1
    return r - l - 1 if l < r else 0


if __name__ == "__main__":
    Q = 0
    N, Q = map(int, input().split())
    s = input()
    queries = [tuple(input().split()) for _ in range(Q)]
    ans = snuke_the_wizard(N, Q, s, queries)
    print(ans)
s = input()


if s='ABC'
  print('ARC')  
else if s='ARC' 
    print('ABC')  





### FIXED CODE ###

s = input()


if s=='ABC':
  print('ARC')  
elif s=='ARC':
    print('ABC')
n=int(input())
a=list(range(n))
b=0
for i in range(n):
  if len(a[i])%2==1:
    b+=1
print(b)

### FIXED CODE ###

n=int(input())
a=list(range(1,n+1))
b=0
for i in range(n):
  if len(str(a[i]))%2==1:
    b+=1
print(b)
import sys

def main(a,b,h):
    reuturn (a+b)*h//2

a =int(sys.stdin.readline().strip())
b =int(sys.stdin.readline().strip())
h =int(sys.stdin.readline().strip())

print(main(a,b,h))


### FIXED CODE ###

import sys

def main(a,b,h):
    return (a+b)*h//2

a =int(sys.stdin.readline().strip())
b =int(sys.stdin.readline().strip())
h =int(sys.stdin.readline().strip())

print(main(a,b,h))
import sys


def resolve(in_):
    n = int(next(in_))
    c = next(in_).strip()

    ans = 0
    left = 0
    right = len(c) - 1
    while left < right:
        if c[left] == 'R':
            left += 1
            continue
        if c[right] == 'W':
            right -= 1
            continue
        left += 1
        right -= 1
        ans += 1

    return ans


def main():
    answer = resolve(sys.stdin)
    print(answer)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
from math import ceil, floor

def cut_logs(x, a):
    return sum(ceil(ai / x) - 1 for ai in a)


def resolve(in_):
    n, k = map(int, next(in_).split())
    logs = tuple(map(int, next(in_).split()))  # A
    assert n == len(logs)
    max_logs = max(logs)

    lb = 0
    ub = max_logs
    while ub - lb > 1:
        mid = (ub + lb) // 2
        v = cut_logs(mid, logs)
        # print(f'{lb=} {mid=} {ub=} {v<=k=} {v=} {k=}')
        if v <= k:
            ub = mid
        else:
            lb = mid
    # print(f'end: {lb=} {mid=} {ub=} {v<=k=} {v=} {k=}')

    return ub


def main():
    answer = resolve(sys.stdin.buffer)
    print(answer)


if __name__ == '__main__':
    main()
if k <= a:
    print(k)
elif k <= a +b:
    print(a)

else:
    print(a -(k-a-b))

### FIXED CODE ###

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

if k <= a:
    print(k)
elif k <= a +b:
    print(a)

else:
    print(a -(k-a-b))
a = list(map(int,input().split()))
sum = a[0] + a[1] + a[2]
if sum <= 21
	print("win")
else
	print("bust")

### FIXED CODE ###

a = list(map(int,input().split()))
sum = a[0] + a[1] + a[2]
if sum >= 22:
	print("bust")
else:
	print("win")
import sys
import math
import itertools

n = int(sys.stdin.readline())
total = math.factorial(n)
res = 0
acc = 0
lines = []

for i in range(n):
    lines.append(sys.stdin.readline().rstrip('\n'))
for y in itertools.combinations(lines, 2):
    acc += ((int(y[0][0]) - int(y[1][0]))**2) + ((int(y[0][1]) - int(y[1][1]))**2)
    acc += math.sqrt(acc)

res = acc/total
print(res)

### FIXED CODE ###

n = int(input())

fin = n//2
s = input()

debut = s[0:fin]

if s == debut + debut:
    print("Yes")
else:
    print("No")
import sys

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

if a.index(0):
    print(0)
    sys.exit()

hg = 10 ** 18
ans = 1
for i in a:
    ans *= i
    if ans > hg:
        print(-1)
        sys.exit()

print(ans)

### FIXED CODE ###

import sys

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

if 0 in a:
    print(0)
    sys.exit()

hg = 10 ** 18
ans = 1
for i in a:
    ans *= i
    if ans > hg:
        print(-1)
        sys.exit()

print(ans)
a,b,c=map(int,input().split())
import math
if 4*a*b<(c-a-b)**2
  print('Yes')
else:
  print('No')


### FIXED CODE ###

a,b,c=map(int,input().split())
import math
if 4*a*b<(c-a-b)**2 and c-a-b>=0:
  print('Yes')
else:
  print('No')
import sys
import collections
def input():
    return sys.stdin.readline()[:-1]
sys.setrecursionlimit(3000)
n,m,k=map(int,input().split())
gf = [[]for i in range(n)]
gb = [[]for i in range(n)]
for i in range(m):
    a,b = map(int,input().split())
    gf[a-1].append(b-1)
    gf[b-1].append(a-1)

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

seen = [0 for i in range(n)]

def dfs(i,k):
    for nec in gf[i]:
        if seen[nec]!=0:
            continue
        seen[nec]=k
        dfs(nec,k)
k=1

for i in range(n):
    if seen[i]==0:
        dfs(i,k)
        k+=1
c = collections.Counter(seen)
lis = []
for i in range(n):
    dec = 0
    for k in gb[i]:
        if seen[i]==seen[k]:
            dec += 1
    lis.append(c[seen[i]]-len(gf[i])-dec-1)
print(*lis)


### FIXED CODE ###

#計算時間が足りない　何がダメなのか　工夫が足りない　研究が必要
from collections import deque


N, M, K = map(int, input().split())
friend = [list(map(int,input().split())) for _ in range(M)]
block = [list(map(int, input().split())) for _ in range(K)]
#sys.setrecursionlimit(2*N)
#print(friend)
#print(block)
graph = [[] for _ in range(N)]
bgraph = [[] for _ in range(N)]
cnt = [0]*N
for i in range(M):
    ii, jj = friend[i]
    graph[ii-1].append(jj-1)
    graph[jj-1].append(ii-1)

for i in range(K):
    ii, jj = block[i]
    bgraph[ii-1].append(jj-1)
    bgraph[jj-1].append(ii-1)

#print(graph)
#print(bgraph)

seen = [False for _ in range(N)]
seenb = [False for _ in range(N)]
def dfs():
    labelb = 1
    #while False in seen:
    for i in range(N):
        if seen[i] != False: continue
        label = 1
        #i = seen.index(False)
        seen[i] = label
        seenb[i] = labelb
        que = deque([i])
        seg = deque([i])
        while que:
            #print(que)
            neci = que.pop()
            for nec in graph[neci]:
                if seen[nec]== False:
                    seen[nec]=label
                    seenb[nec]=labelb
                    que.append(nec)
                    seg.append(nec)
                    label += 1
        for iii in seg:
            seen[iii] = label

        labelb += 1

dfs()
for i in range(N):
    count = seen[i] - 1 -len(graph[i])
    if bgraph[i] and seen[i]>=2:
          for j in bgraph[i]:
                if seenb[i] == seenb[j]:
                    count -= 1
    cnt[i]=count
print(*cnt)
N= input( "N : ")
X= input( "X : ")
T= input( "T : ")
if(N % X == 0):
    print((N // X) * T)
else:
    print(((N // X) *T) + T)

### FIXED CODE ###

N,X,T = map(int, input().split())
if(N % X == 0):
    print((N // X) * T)
else:
    print(((N // X) *T) + T)
# -*- coding: utf-8 -*-

N = int(input())
V = map(int, input().split())
C = map(int, input().split())

gain = 0
for i in range(0,N):
    if(V[i]>C[i]):
        gain += V[i] - C[i]

print(gain)

### FIXED CODE ###

a,b,t=map(int,input().split())
print((t//a)*b)
# 2019/06/22
# AtCoder Beginner Contest 070 - C

import fractions

def lcm_fgf(a, b):
    return int(a * b / fractions.gcd(a, b))

# Input
n = int(input())
alcm = 1

for i in range(n):
    wt = int(input())
    alcm = lcm_fgf(alcm, wt)

# Output
print(alcm)


### FIXED CODE ###

# 2019/06/22
# AtCoder Beginner Contest 070 - C

import fractions

def lcm_fgf(a, b):
    return int(a * b // fractions.gcd(a, b))

# Input
n = int(input())
alcm = 1

for i in range(n):
    wt = int(input())
    alcm = lcm_fgf(alcm, wt)

# Output
print(alcm)
n = input()
num = len(s)-2
for i in range(num,0,2):
  f = int(i/2)
  if s[:f]==s[f:i]:
    print(i)
    break

### FIXED CODE ###

n = input()
num = len(n)-2
for i in range(num,0,-2):
  f = int(i/2)
  if n[:f]==n[f:i]:
    print(i)
    break
print("A"%s"C"%input()[8])

### FIXED CODE ###

s=input()
print("A"+s[8]+"C")
X, N = map(int, input().split())
*P, = map(int, input().split())
cand = set(range(101)) - set(P)
ans, temp = None, 10**10
for c in cand:
    t = abs(X - c)
    if t < temp:
        temp = t; ans = min(ans, c)
print(ans)

### FIXED CODE ###

X, N = map(int, input().split())
*P, = map(int, input().split())
cand = set(range(-50, 151)) - set(P)
cand = sorted([c for c in cand], key=lambda x: (abs(X - x), x))
print(cand[0])
[p]sp?[zr0=p1<x]dsxx

### FIXED CODE ###

import sys
import math
import itertools
from copy import copy
from collections import deque,Counter
from decimal import Decimal
def s(): return input()
def i(): return int(input())
def S(): return input().split()
def I(): return map(int,input().split())
def L(): return list(input().split())
def l(): return list(map(int,input().split()))
def lcm(a,b): return a*b//math.gcd(a,b)
sys.setrecursionlimit(10 ** 9)
mod = 10**9+7

x1 = l()
for i in range(5):
    if i+1 != x1[i]:
        print(i+1)
r=(int,input().split)
a=3(rxr)


### FIXED CODE ###

r=int(input())
a=3*(r*r)
print(a)
A,B,K=map(int,input().split())
ea=min(A,K)
A-=ea
K-=ea
eb=min(B,K)
B-=eb
k-=eb
print(A,B)

### FIXED CODE ###

a, b, k = map(int, input().split())
 
if a >= k:
    print(a - k, b)
else:
    print(0, max(0, b - k + a))
import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))


def bisect_left_callable(fn, x, lo, hi):
    """
    (memo) いっぱい呼ぶなら np.searchsorted のほうがベクトル化されててはやそう
    lo から hi-1 のうち、fn の結果が x 以上となる、最も左の値
    bisect.bisect_left と同じ
    https://docs.python.org/ja/3/library/bisect.html
    :param callable fn:
    :param x:
    :param int lo: 最小値
    :param int hi: 最大値 + 1
    :return: lo <= ret <= hi
    """
    while lo < hi:
        mid = (lo + hi) // 2
        if fn(mid) < x:
            lo = mid + 1
        else:
            hi = mid
    return lo


def solve(n, a=False):
    mts = A.copy()
    mts[0] -= n
    mts[-1] -= n
    hist = [n*2]
    for i in range(N):
        mts[(i + 1) % N] -= mts[i]
        hist.append(mts[i] * 2)
    if a:
        return hist
    else:
        return -mts[-1]


n = bisect_left_callable(solve, 0, 0, A[0] + 1)
print(*solve(n, True)[:-1])


### FIXED CODE ###

import os
import sys

if os.getenv("LOCAL"):
    sys.stdin = open("_in.txt", "r")

sys.setrecursionlimit(2147483647)
INF = float("inf")
IINF = 10 ** 18
MOD = 10 ** 9 + 7

N = int(sys.stdin.readline())
A = list(map(int, sys.stdin.readline().split()))


def bisect_left_callable(fn, x, lo, hi):
    """
    (memo) いっぱい呼ぶなら np.searchsorted のほうがベクトル化されててはやそう
    lo から hi-1 のうち、fn の結果が x 以上となる、最も左の値
    bisect.bisect_left と同じ
    https://docs.python.org/ja/3/library/bisect.html
    :param callable fn:
    :param x:
    :param int lo: 最小値
    :param int hi: 最大値 + 1
    :return: lo <= ret <= hi
    """
    while lo < hi:
        mid = (lo + hi) // 2
        if fn(mid) < x:
            lo = mid + 1
        else:
            hi = mid
    return lo


def solve(n, a=False):
    mts = A.copy()
    mts[0] -= n
    mts[-1] -= n
    hist = [n*2]
    for i in range(N):
        mts[(i + 1) % N] -= mts[i]
        hist.append(mts[i] * 2)
    if a:
        return hist
    else:
        return -mts[-1]


n = bisect_left_callable(solve, 0, 0, A[0] + 1)
print(*solve(n, True)[:-1])
# -*- coding: utf-8 -*-
def conv(a): #convert the num to character
  a += 97
  return chr(a)

# 整数の入力
n = int(input())
name = ''

while n>0:
  n -= 1
  name += conv(n%26)
  n //= 26

# 出力
print(name[::-1])

### FIXED CODE ###

c = input()
oc = ord(c)

if 65<=oc<=90:
  print('A')
else:
  print('a')