Harryxun/stf_run huggingface dataset:
from math import factorial as fact
import math
import fractions
import sys
import itertools
import numpy as np
from collections import Counter
import datetime
#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(n,r))

def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets

#公約数の列挙
def ch(x1):
	cf=[]
	for i in range(2,math.sqrt(x1)+1):
		if x1 % i==0:
			cf.append(i)
	return cf

def CountOneRoots(x,y):
	#x:縦，y:横
	return fact(x+y)/fact(x)/fact(y)

# 素因数分解
def factorization(n):
	arr=[]
	tmp=n
	count=0
	for i in range(2,int(-(-n**0.5//1))+1):
		if tmp%i==0:
			cnt=0
			count+=1
			while tmp%i==0:
				cnt+=1
				tmp//=i
		if tmp==1:
			break
	return count+1
			


A,B=input2()
gcd=math.gcd(A,B)
# ch=ch(gcd)
print(factorization(int(gcd)))
#素数を数える






### FIXED CODE ###

from math import factorial as fact
import math
import fractions
import sys
import itertools
import numpy as np
from collections import Counter
import datetime
#入力:N(int:整数)
def input1():
	return int(input())

#入力:N,M(int:整数)
def input2():
	return map(int,input().split())

#入力:[n1,n2,...nk](int:整数配列)
def input_array():
	return list(map(int,input().split()))

def keta(N):
	return len(str(N))


def input_daytime(input_time):
	time,distance=input_time.split()
	t=time.split(":")
	se=str(t[-1]).split(".")
	dt1 = datetime.timedelta(hours=int(t[0]),minutes=int(t[1]),seconds=int(se[0]),milliseconds=int(se[1]))
	return dt1

def combinations(n,r):
	return list(itertools.combinations(n,r))

def all_sets(num_list):
	subsets=[]
	for i in range(2,len(num_list) + 1):
		for c in combinations(num_list, i):
			subsets.append(c) 
	return subsets

#公約数の列挙
def ch(x1):
	cf=[]
	for i in range(2,math.sqrt(x1)+1):
		if x1 % i==0:
			cf.append(i)
	return cf

def CountOneRoots(x,y):
	#x:縦，y:横
	return fact(x+y)/fact(x)/fact(y)

# 素因数分解
def factorization(n):
	tmp=n
	count=0
	for i in range(2,int(n**0.5)+2):
		if tmp%i==0:
			cnt=0
			while tmp%i==0:
				cnt+=1
				tmp//=i
			count+=1
	if tmp!=1:
		count+=1

	return count
			


A,B=input2()
gcd=fractions.gcd(A,B)
# ch=ch(gcd)
print(factorization(int(gcd))+1)
# import numpy as np
import math

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

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

def undivided_under(N, C, D):
    dived_C = N // C
    dived_D = N // D
    dived_lcm = N // lcm(C, D)

    # print(dived_C, dived_D, dived_lcm)

    return(N - dived_C - dived_D + dived_lcm)

# print(A,B,C,D)
# print(undivided_under( B, C, D ))
# print(undivided_under( A-1, C, D ))

print( int( undivided_under(B, C, D) - undivided_under(A-1, C, D)) )


### FIXED CODE ###

# import numpy as np
import fractions

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

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

def undivided_under(N, C, D):
    dived_C = N // C
    dived_D = N // D
    dived_lcm = N // lcm(C, D)

    # print(dived_C, dived_D, dived_lcm)

    return(N - dived_C - dived_D + dived_lcm)

# print(A,B,C,D)
# print(undivided_under( B, C, D ))
# print(undivided_under( A-1, C, D ))

print( int( undivided_under(B, C, D) - undivided_under(A-1, C, D)) )
K = int(input())
l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(l[K])

### FIXED CODE ###

K = int(input())
l = [1, 1, 1, 2, 1, 2, 1, 5, 2, 2, 1, 5, 1, 2, 1, 14, 1, 5, 1, 5, 2, 2, 1, 15, 2, 2, 5, 4, 1, 4, 1, 51]

print(l[(K-1)])
n, x = map(int, input().split())
l = list(map(int,input().split()))
cnt = 0
for i in range(n+1):
    cnt += l[i]
    if cnt > x:
        break
print(i + 1)

### FIXED CODE ###

n, x = map(int, input().split())
l = list(map(int,input().split())) + [0]
cnt = 0
if sum(l) <= x:
    print(n+1)
    exit()
for i in range(n + 1):
    if cnt > x:
        break
    cnt += l[i]
print(i)
N, K = map(int, input().split())
friends = list(map(int, input().split()))

n = len([1 for x in friends if x>K])

print(n)

### FIXED CODE ###

from decimal import Decimal, ROUND_HALF_UP, ROUND_HALF_EVEN

N = int(input())

if N%2==0:
    odd_count = N//2
else:
    odd_count = N//2+1
print('{:.10f}'.format(odd_count/N))
s = input()
s = s.replase('eraser', '')
s = s.replase('erase', '')
s = s.replase('dreamer', '')
s = s.replase('dream', '')

if l == '':
    print('YES')
else:
    print('NO')

### FIXED CODE ###

l = input()
l = l.replace('eraser','')
l = l.replace('erase','')
l = l.replace('dreamer','')
l = l.replace('dream','')
 
if l == '':
    print('YES')
else:
    print('NO')
import numpy as np


def main():
    H, W = [int(x) for x in input().split()]
    board = [[0 for i in range(H)] for j in range(W)]

    """ #は1, .は0 """
    for i in range(H):
        X = input()
        for j in range(len(X)):
            if X[j] == "#":
                board[i][j] = 1

    num_board = np.array(board)
    height, width = num_board.shape[:2]
    count = 0
    # (np.sum(num_board) != height*width)
    while True:
        num_board_ans = np.zeros((height, width))
        for i in range(height):
            for j in range(width):
                if num_board[i, j] == 1:
                    num_board_ans[i, j] = 1
                    a = max(i-1, 0)
                    num_board_ans[a, j] = 1
                    b = max(j-1, 0)
                    num_board_ans[i, b] = 1
                    c = min(i+1, height-1)
                    num_board_ans[c, j] = 1
                    d = min(j+1, width-1)
                    num_board_ans[i, d] = 1
        num_board = num_board_ans
        count += 1
        if (np.sum(num_board) == height*width):
            break

    print(count)


if __name__ == "__main__":
    main()


### FIXED CODE ###

from collections import deque


def bfs(h, w, board, visited):
    queue = deque([])
    for i in range(h):
        for j in range(w):
            if board[i][j] == "#":
                queue.append([i, j])
                visited[i][j] = 0
    ans = 0
    while queue:
        y, x = queue.popleft()
        for i, j in ([1, 0], [0, 1], [-1, 0], [0, -1]):
            yn, xn = y+i, x+j
            if yn >= h or xn >= w or yn < 0 or xn < 0:
                continue
            if visited[yn][xn] == -1 and board[yn][xn] == ".":
                visited[yn][xn] = visited[y][x] + 1
                queue.append([yn, xn])
                ans = max(ans, visited[yn][xn])

    return ans


def main():
    h, w = map(int, input().split())
    board = [input() for _ in range(h)]
    visited = [[-1 for _ in range(w)] for _ in range(h)]
    print(bfs(h, w, board, visited))


if __name__ == "__main__":
    main()
# -*- coding: utf-8 -*-
from sys import stdin

s_in = lambda: stdin.readline()[:-1] # s = s_in()
d_in = lambda: int(stdin.readline()) # N = d_in()
ds_in = lambda: list(map(int, stdin.readline().split())) # List = ds_in()

N = d_in()

cand = [[i,j,0] for i in range(0, 101) for j in range(0, 101)]

x, y, h = ds_in()
for i in range(len(cand)):
    cand[i][2] = h + abs(x-cand[i][0]) + abs(y-cand[i][1])


info = []
for _ in range(N-1):
    info.append(ds_in())

idx = 0
while len(cand) > 1:
    temp = []
    x, y, h = info[idx]
    for c in cand:
        if c[2] == h + abs(x-c[0]) + abs(y-c[1]):
            temp.append(c)
    cand = temp.copy()
    idx += 1
print(cand[0][0], cand[0][1], cand[0][2])



### FIXED CODE ###

# -*- coding: utf-8 -*-
from sys import stdin

s_in = lambda: stdin.readline()[:-1] # s = s_in()
d_in = lambda: int(stdin.readline()) # N = d_in()
ds_in = lambda: list(map(int, stdin.readline().split())) # List = ds_in()

N = d_in()

cand = [[i,j,0] for i in range(0, 101) for j in range(0, 101)]

info = []
for _ in range(N):
    info.append(ds_in())

info.sort(key=lambda x: x[2], reverse=True)

for i in range(len(cand)):
    x, y, h = info[0]
    cand[i][2] = h + abs(x-cand[i][0]) + abs(y-cand[i][1])

if N > 1:
    idx = 1
    while len(cand) > 1 and idx < N:
        temp = []
        x, y, h = info[idx]
        for c in cand:
            if h == max(0, c[2] - abs(x-c[0]) - abs(y-c[1])):
                temp.append(c)
        cand = temp.copy()
        idx += 1

print(cand[0][0], cand[0][1], cand[0][2])
import bisec
n = int(input())
a = sorted(list(map(int,input().split())))
t = bisec.bisec_left(a,a[n-1]//2)
if t == 0:
    print(a[n-1],a[t])
else:
    if abs(a[n-1]//2-a[t]) > abs(a[n-1]//2-a[t-1]):
        print(a[n-1],a[t-1])
    else:
        print(a[n-1],a[t])

### FIXED CODE ###

import bisect
n = int(input())
a = sorted(list(map(int,input().split())))
ans = 0
mini = float('inf')
for i in range(n):
    if mini > abs(a[i]-a[n-1]/2):
        ans = i
        mini = abs(a[i]-a[n-1]/2)
print(a[n-1],a[ans])
import sys
sys.setrecursionlimit(100000000)

n = int(input())
aa = list(map(int, input().split()))
bb = list(map(int, input().split()))

rates_1 = []
rates_2 = []
for i in range(3):
	if aa[i] > bb[i]:
		rates_2.append([bb[i], aa[i]])
	else:
		rates_1.append([aa[i], bb[i]])

def dp(rest, obtained, memo, rates):
	#print(rest, obtained)
	if rest < 0:
		return -10000

	if memo[rest] != -1:
		return memo[rest]

	memo[rest] = max([dp(rest - x[0],  obtained + x[1], memo, rates) for x in rates_1] + [rest + obtained])
	return memo[rest]


if len(rates_1) > 0:
	memo_1 = [-1 for _ in range(n + 1)]
	m = dp(n, 0, memo_1, rates_1)
else:
	m = n

if len(rates_2) > 0:
	memo_2 = [-1 for _ in range(n + 1)]
	ans = dp(m, 0, memo_2, rates_2)
else:
	ans = m

print(ans)

### FIXED CODE ###

n = int(input())
aa = list(map(int, input().split()))
bb = list(map(int, input().split()))

rates_list = [[],[]]
for i in range(3):
	if aa[i] > bb[i]:
		rates_list[1].append([bb[i], aa[i]])
	else:
		rates_list[0].append([aa[i], bb[i]])

max_d = n
for j in range(2):
	rates = rates_list[j]
	if len(rates) == 1:
		max_d = (max_d // rates[0][0]) * rates[0][1] + max_d % rates[0][0]
	elif len(rates) == 2:
		val = [rates[0][1] * i for i in range(max_d // rates[0][0] + 1)]
		rest = [max_d - rates[0][0] * i for i in range(max_d // rates[0][0] + 1)]
		val = [val[i] + rates[1][1] * (rest[i] // rates[1][0]) + (rest[i] % rates[1][0]) if rest[i] > 0 else val[i] for i in range(len(val))]
		max_d = max(val)
	elif len(rates) == 3:
		dp = [(d // rates[0][0]) * rates[0][1] + d % rates[0][0] for d in range(max_d + 1)]
		for d in range(1, max_d + 1):
			dp[d] = max([dp[d]] + [dp[d - rates[i][0]] + rates[i][1] if d - rates[i][0] >= 0 else d for i in range(1, len(rates))])
		max_d = dp[-1]
print (max_d)
from collections import deque
n,m = map(int,input().split())
G = [set() for _ in range(n)]
for _ in range(m):
    a,b = map(int,input().split())
    G[a-1].add(b-1)
    G[b-1].add(a-1)
ans = [-1 for _ in range(n)]

ans[0]=0
q = deque([0])
q2 = deque()

seen = set()
seen.add(0)

for _ in range(n):
    while q:
        q2 = deque()
        #print(ans,q,q2,seen)
        i = q.pop()
        for j in G[i]:
            if j in seen:
                continue
            q2.append(j)
            ans[j] = i+1
            seen.add(j)
            '''if cost[i] ==-1:
                cost[i] = c
                ans[i] = j
            elif cost[i] > cost[j] + 1:
                cost[i] = cost[j] + 1
                ans[i] = j
            else:
                pass'''
    q = q2
    if len(seen) == n:
        print("Yes")
        print(*ans[1:], sep="\n")
        sys.exit()
        
print("No")

### FIXED CODE ###

from collections import deque

N, M = map(int, input().split())
d = [set() for _ in range(N+1)]
for _ in range(M):
    a, b = map(int, input().split())
    d[a].add(b)
    d[b].add(a)

queue=deque([1])
vs = set([1])
parents = [0] * (N+1)
while queue:
    v = queue.popleft()
    for u in d[v]:
        if u in vs:
            continue
        parents[u] = v
        vs.add(u)
        queue.append(u)
print("Yes")
for x in parents[2:]:
    print(x)
n, x = map(int, input().split())
l = [int(i) for i in range(n)]
print(n+((x-sum(l))//min(l))

### FIXED CODE ###

n, x = map(int, input().split())
l = [int(input()) for _ in range(n)]
print(n+(x-sum(l))//min(l))
N=int(input())
import sys
# sys.setrecursionlimit(10**6)
T=[[] for _ in range(N)]
for i in range(N-1):
    a,b,c=map(int, input().split())
    T[a-1].append((b-1,c))
    T[b-1].append((a-1,c))

Q,K=map(int, input().split())
D=[-1]*N
D[K-1]=0
def dfs(start, nowd):
    to=T[start]
    for t in to:
        next_node,c=t
        if D[next_node]!=-1:
            continue
        nextd=nowd+c
        D[next_node]=nextd
        dfs(next_node, nextd)
dfs(K-1,0)
# print(D)
for i in range(Q):
    x,y=map(int, input().split())
    print(D[x-1]+D[y-1])


### FIXED CODE ###

N=int(input())
import sys
sys.setrecursionlimit(10**6)
T=[[] for _ in range(N)]
for i in range(N-1):
    a,b,c=map(int, input().split())
    T[a-1].append((b-1,c))
    T[b-1].append((a-1,c))

Q,K=map(int, input().split())
D=[-1]*N
D[K-1]=0
def dfs(start, nowd):
    to=T[start]
    for t in to:
        next_node,c=t
        if D[next_node]!=-1:
            continue
        nextd=nowd+c
        D[next_node]=nextd
        dfs(next_node, nextd)
dfs(K-1,0)
# print(D)
for i in range(Q):
    x,y=map(int, input().split())
    print(D[x-1]+D[y-1])
A, B = map(int, input().split(''))
if A - B * 2 > 0:
    print(A - B * 2)
else:
    print(0)

### FIXED CODE ###

a, b = map(int, input().split())  
if a - b * 2 > 0:
    print(a - b * 2)
else:
    print(0)
def cost(n, a, m):

  hihumi = 0  #hihumi => 滝本ひふみ

  for i in range(n):
    hihumi += (a[i] - m) ** 2

  return hihumi

N = int(raw_input())
a = map(int, raw_input().split())

ans = 100

for i in range(min(a), max(a) + 1):
  if (ans > cost(N, a, i)):
    ans = const(N, a, i)

print ans

### FIXED CODE ###

# coding: utf-8

def cost(n, a, m):

  hihumi = 0  #hihumi => 滝本ひふみ

  for i in range(n):
    hihumi += (a[i] - m) ** 2

  return hihumi

N = int(raw_input())
a = map(int, raw_input().split())

ans = 1000000000000

for i in range(min(a), max(a) + 1):
  if (ans > cost(N, a, i)):
    ans = cost(N, a, i)

print ans
import itertools

n, m = map(int, input().split(' '))
x = map(int, input().split(' '))
if n >= m:
    print(0)
else:
    x = sorted(x)
    seq = [i for i in range(1,m)]
    locations = itertools.combinations(seq,n-1)
    best_sc = None
    for location in locations:
        sc = 0
        for i in range(0,n):
            g = None
            if i == 0:
                g = x[:location[i]]
            elif i == n-1:
                g = x[location[i-1]:]
            else:
                g = x[location[i-1]:location[i]]
            sc += g[-1] - g[0]
        if (best_sc is None) or (best_sc > sc):
            best_sc = sc
    print(best_sc)


### FIXED CODE ###

n, m = map(int, input().split(' '))
x = list(map(int, input().split(' ')))
if n >= m:
    print(0)
else:
    x.sort()
    d = [x[i+1] - x[i] for i in range(m-1)]
    d.sort()
    #print(d)
    print(sum(d[:m-n]))
c=0
def doublet(n,f):
    global c
    if n<f:
        c=c+1
        return doublet(2*n,f)
    else:
        return c
num=eval(input())
k=eval(input())
if (num>=1 and num<=10**5) and (k>=1 and k<=10**5):
    sum_power=0.0
    for i in range(1,(num+1),1):
        count=doublet(i,k)
        p=pow(2,count)*num
        sum_power=sum_power+(1/p)
        c=0
    print(sum_power)


    


### FIXED CODE ###

c=0
def doublet(n,f):
    global c
    if n<f:
        c=c+1
        return doublet(2*n,f)
    else:
        return c
num,k=input().split()
num=int(num)
k=int(k)
#k=eval(input())
if (num>=1 and num<=10**5) and (k>=1 and k<=10**5):
    sum_power=0.0
    for i in range(1,(num+1),1):
        count=doublet(i,k)
        p=pow(2,count)*num
        sum_power=sum_power+(1/p)
        c=0
    print(sum_power)
N=input()
ST=input()
S=ST.split(' ')[0]
T=ST.split(' ')[1]
result=''

for i in range(int(N)):
  result+=S[i]
  result+=T[i]
  
print(result)

### FIXED CODE ###

a=input()
inputarray=[1,2,3]
inputarray.remove(int(a))
b=input()
inputarray.remove(int(b))
print(inputarray[0])
s = list(input())

if s[0]!="A":
  print("WA")
  exit()

frag = True
for i in range(2,len(s)-2):
  if s[i]=='C':
    frag = False
    del s[i]

if frag:
  print("WA")
  exit()
  
if not "".join(s[1:]).islower():
  print("WA")
else:
  print("AC")

### FIXED CODE ###

s = list(input())

if s[0]!="A":
  print("WA")
  exit()

frag = True
for i in range(2,len(s)-1):
  if s[i]=='C':
    frag = False
    del s[i]
    break

if frag:
  print("WA")
  exit()
  
if not "".join(s[1:]).islower():
  print("WA")
else:
  print("AC")
n = int(input())
c = list(input())
flag = False
ans = 0
for i in range(n-1):
    if c[i] == "W" and c[i+1] == "R":
        flag = True
        break
if not flag:
    print(0)
    exit()
if c[0] == "W" and c[-1] == "R":
    ans += 1
    c[0], c[-1] = "R", "W"
    for i in range(n-1):
        if c[i] == "W" and c[i+1] == "R":
            ans += 1
    print(ans)
elif c[0] == "R" and c[-1] == "W":
    for i in range(n-1):
        if c[i] == "W" and c[i+1] == "R":
            ans += 1
    print(ans)
elif c[0] == "R" and c[-1] == "R":
    for i, v in enumerate(a):
        if i != 0 and v == "W":
            c[i] = "R"
            c[-1] = "W"
    ans += 1
    for i in range(n-1):
        if c[i] == "W" and c[i+1] == "R":
            ans += 1
    print(ans)
else:
    for i, v in enumerate(reversed(a)):
        if i != 0 and v == "R":
            c[n-1-i] = "W"
            c[0] = "R"
    ans += 1
    for i in range(n-1):
        if c[i] == "W" and c[i+1] == "R":
            ans += 1
    print(ans)

### FIXED CODE ###

n = int(input())
c = list(input())
print(len([i for i, j in zip(sorted(c), c) if i != j])//2)
import sys

class binarySearchTree:
    def __init__(self):
        self.root = None

    def insert(self, key):
        z = Node(key)
        y = None
        x = self.root
        while x:
            y = x
            if z.key < x.key:
                x = x.left
            else:
                x = x.right

        if y is None:
            self.root = z
        elif z.key < y.key:
            y.left = z
        else:
            y.right = z

    def printBT(self):
        print inorderTreeWalk(self.root)
        print preorderTreeWalk(self.root)

class Node:
    def __init__(self, key):
        self.key = key
        self.left = None
        self.right = None

def inorderTreeWalk(node):
    if node:
        return inorderTreeWalk(node.left) + " " + str(node.key) + inorderTreeWalk(node.right)
    return ""

def preorderTreeWalk(node):
    if node:
        return " " + str(node.key) + preorderTreeWalk(node.left) + preorderTreeWalk(node.right)
    return ""

if __name__ == "__main__":
    m = int(raw_input())
    bt = binarySearchTree()
    for i in range(m):
        line = map(str, raw_input())
        if line[0] == "i":
            bt.insert(int(line[i].split()[1]))
        else:
            bt.printBT()

### FIXED CODE ###

import sys

class Node:
    def __init__(self, key):
        self.key = key
        self.parent = None
        self.left = None
        self.right = None

def insert(z):
    global root
    y = None
    x = root
    while x is not None:
        y = x
        if z.key < x.key:
            x = x.left
        else:
            x = x.right
    z.parent = y
    if y is None:
        root = z
    elif z.key < y.key:
        y.left = z
    else:
        y.right = z

def inorderTreeWalk(node):
    global In
    if node:
        inorderTreeWalk(node.left)
        In.append(str(node.key))
        inorderTreeWalk(node.right)

def preorderTreeWalk(node):
    global Pre
    if node:
        Pre.append(str(node.key))
        preorderTreeWalk(node.left)
        preorderTreeWalk(node.right)

if __name__ == "__main__":
    lines = sys.stdin.readlines()
    del lines[0]

    root = None
    for line in lines:
        if line[0] == "i":
            insert(Node(int(line.split()[1])))
        else:
            In = []
            Pre = []
            inorderTreeWalk(root)
            print " " + " ".join(map(str, In))
            preorderTreeWalk(root)
            print " " + " ".join(map(str, Pre))
n = int(input())
h = [int(x) for x in input().split()]
cnt = []
cur_cnt = 0
for x in range(n-1):
    if h[x] >= h[x + 1]:
        cur_cnt += 1
    else:
        cnt.append(cur_cnt)
        cur_cnt = 0
cnt.append(cur_cnt)

print(max(count))


### FIXED CODE ###

n = int(input())
h = list(map(int,input().split()))
cnt = 0
ans = 0
for i in range(n-1):
    if h[i] >= h[i+1]:
        cnt += 1
        ans = max(ans,cnt)
    else:
        cnt = 0
print(ans)
#!/usr/bin/env pypy3
n=int(input())
if n%10 in (2,4,5,7,9):
    print ('hon')
elif n%10 in (0,1,6,8):
    print ('pon')
else:
    print('bon')


### FIXED CODE ###

x = input()
if x.upper() == x:
    print("A")
else:
    print("a")
str=imput()
if(str[0]!=atr[1]||str[1]!=str[2]):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

S=input()
if (S[0]!=S[1])|(S[2]!=S[1]) :
    print("Yes")
else:
    print("No")
import sys

N = int(input())
XY = [[int(_) for _ in input().split()] for i in range(N)]

mc = [0, 0]
maxl = 0

for x, y in XY:
    l = abs(x) + abs(y)
    maxl = max(maxl, l)
    mc[l % 2] += 1

if mc[0] > 0 and mc[1] > 0:
    print(-1)
    sys.exit()

if maxl > 20:
    raise

print(maxl)
print(*([1]*maxl))

for x, y in XY:
    w = ""
    if x < 0:
        w += "L" * (-x)
    if x > 0:
        w += "R" * (+x)
    if y < 0:
        w += "D" * (-y)
    if y > 0:
        w += "U" * (+y)
    a = (maxl - len(w)) // 2
    if a > 0:
        w = "R"*a + w + "L"*a
    print(w)


### FIXED CODE ###

import sys

N = int(input())
XY = [[int(_) for _ in input().split()] for i in range(N)]

mc = [0, 0]
maxl = 0

for x, y in XY:
    l = abs(x) + abs(y)
    maxl = max(maxl, l)
    mc[l % 2] += 1

if mc[0] > 0 and mc[1] > 0:
    print(-1)
    sys.exit()

#print(maxl)

def calc(sx, sy, ex, ey, d):
    dx, dy = ex - sx, ey - sy
    rx, ry = dx - dy, dx + dy
    if rx > 0:
        if ry > 0:
            d, x, y = "R", sx + d, sy
        else:
            d, x, y = "D", sx, sy - d
    else:
        if ry > 0:
            d, x, y = "U", sx, sy + d
        else:
            d, x, y = "L", sx - d, sy
    return d, x, y

import math

l = math.ceil(math.log(maxl + 1, 2))

ms = [2 ** (l - i - 1) for i in range(l)]

rms = ms

if mc[0] > 0:
    rms = [1] + ms

print(len(rms))
print(*rms)

for ex, ey in XY:
    x, y = 0, 0
    w = ""
    if mc[0] > 0:
        w = "R"
        x += 1
    for m in ms:
        d, x, y = calc(x, y, ex, ey, m)
        w += d
    print(w)
uwaaaaaaaaaaaaaaaaaaaaaa

### FIXED CODE ###

#ABC119 D - Lazy Faith
from bisect import bisect_left,bisect_right
si = lambda: input()
ni = lambda: int(input())
nm = lambda: map(int, input().split())
nl = lambda: list(map(int, input().split()))

a,b,q = map(int, input().split())
INF = 10**11
S = [-INF]+[int(input()) for _ in range(a)]+[INF]
T = [-INF]+[int(input()) for _ in range(b)]+[INF]
X = [int(input()) for _ in range(q)]

for i in range(q):
    idx_s = bisect_right(S,X[i])
    idx_t = bisect_right(T,X[i])
    ans = INF
    for s in [S[idx_s-1],S[idx_s]]:
        for t in [T[idx_t-1],T[idx_t]]:
            d1,d2 = abs(s-X[i])+abs(s-t),abs(t-X[i])+abs(t-s)
            ans = min(ans,d1,d2)
    print(ans)
N = int(input())
cards = ["{0} {1}".format(type, order) for type in ('S', 'H', 'C', 'D') for order in range(1,14)]
for i in range(N):
    card = input()
    cards.remove(card)
for rest in cards
    print(rest)

### FIXED CODE ###

N = int(input())
cards = ["{0} {1}".format(type, order) for type in ('S', 'H', 'C', 'D') for order in range(1,14)]
for i in range(N):
    card = input()
    cards.remove(card)
for rest in cards:
    print(rest)
K=int(input())
S=str(input())
if len(S)<=K:
    print(S)
else:
    print(S[:K]+'...')

### FIXED CODE ###

N=str(input())
M=int(N[len(N)-1])

h=[2,4,5,7,9]
p=[0,1,6,8]
if M in h:
    print('hon')
elif M in p:
    print('pon')
else:
    print('bon')