Harryxun/stf_run huggingface dataset:
n = int(input())
a = list(map(int , input().split()))
pos = sorted([i for i in a if i >= 0], reverse=True)
neg = sorted([i for i in a if i < 0], reverse=True)

ans = 0
if len(neg) == 0 and len(pos) == 2:
    print(pos[0] - pos[1])
    print(pos[0], pos[1])
    exit()
elif len(pos) == 0 and len(neg) == 2:
    print(neg[0] - neg[1])
    print(neg[0], neg[1])
    exit()
elif len(neg) == 0:
    neg.append(pos.pop())

tmp = neg.pop()
ans = []
while len(pos) > 1:
    a = pos.pop()
    ans.append([tmp, a])
    tmp -= a

for i in neg:
    ans.append(tmp, i)
    tmp -= i

ans.append([pos[0], tmp])
print(pos[0] - tmp)
[print(*i) for i in ans]


### FIXED CODE ###

n = int(input())
a = list(map(int , input().split()))
pos = sorted([i for i in a if i >= 0], reverse=True)
neg = sorted([i for i in a if i < 0], reverse=True)

ans = []
if len(neg) == 0 and len(pos) == 2:
    print(pos[0] - pos[1])
    print(pos[0], pos[1])
    exit()
elif len(pos) == 0:
    tmp = neg[0]
    for i in range(1,len(neg)):
        ans.append([tmp, neg[i]])
        tmp -= neg[i]
    print(tmp)
    [print(*i) for i in ans]
    exit()
elif len(neg) == 0:
    neg.append(pos.pop())

tmp = neg.pop()
while len(pos) > 1:
    a = pos.pop()
    ans.append([tmp, a])
    tmp -= a
neg.append(tmp)

tmp = pos[0]
for i in neg:
    ans.append([tmp, i])
    tmp -= i

print(tmp)
[print(*i) for i in ans]
def main():
    N = int(input())
    A = list(map(int, input().split()))
    p = 10**9 + 7
    MAX = max(A)
    LCM = {num: 0 for num in range(2, MAX+1)}
    A2Factor = [{num: 0 for num in range(2, MAX+1)} for _ in range(N)]

    def factorization(n, idx):
        temp = n
        flag = 0
        for i in range(2, int(-(-n**0.5//1))+1):
            if temp%i==0:
                cnt=0
                while temp%i==0:
                    cnt+=1
                    temp //= i
                flag = 1
                LCM[i] = max(LCM[i], cnt)
                A2Factor[idx][i] = cnt
        if temp!=1:
            LCM[temp] = max(LCM[temp], 1)
            A2Factor[idx][temp] = 1 
        if not flag:
            LCM[n] = max(LCM[n], 1)
            A2Factor[idx][n] = 1
        return LCM, A2Factor

    for idx in range(N):
        LCM, A2Factor = factorization(A[idx], idx)

    ans = 0
    for i in range(N):
        ans_dict = {}
        tmp = 1
        for num in range(2, MAX+1):
            ans_dict[num] = abs(LCM[num] - A2Factor[i][num])
        for key, value in ans_dict.items():
            tmp *= pow(key, value, p)
            tmp %= p
        ans += tmp%p
    print(ans % p)
main()

### FIXED CODE ###

from math import gcd

def lcm(a, b):
    return a*b//gcd(a,b)
def main():
    N = int(input())
    A = list(map(int, input().split()))
    mod = 10**9 + 7
    LCM = 1
    for a in A:
        LCM = lcm(LCM, a)
    ans = 0
    for a in A:
        ans += (LCM//a)
        

    print(ans % mod)
main()
n,x,m = map(int,input().split())
mod = m
ans = 0
bit = [-1 for i in range(m)]
cycle = False
for i in range(n):
    if i == 0 :
        a = x
        bit[a] = i
        ans += a
    else:
        a = (a**2)% mod
        if bit[a] != -1:
            cy_st = bit[a]
            cy_fi = i -1
            cycle = True
            break
        else:
            bit[a] = i
            ans += a

if cycle:
    ans2 = 0
    for j in range(cy_st):
        if j == 0 :
            b = x
            ans2 += b
        else:
            b = (b**2)% mod
            ans2 += b
    cy_num = ans - ans2
    cy_repe = (n-cy_st) // (cy_fi - cy_st + 1)
    ans3 = cy_num * cy_repe
    cy_amari = (n-cy_st) % (cy_fi - cy_st + 1)
    for i in range(cy_amari):
        b = (b**2)% mod
        ans3 += b

    print(ans2+ans3)
else:
    print(ans)


### FIXED CODE ###

n,x,m = map(int,input().split())
mod = m
ans = 0
bit = [-1 for i in range(m)]
cycle = False
for i in range(n):
    if i == 0 :
        a = x
        bit[a] = i
        ans += a
    else:
        a = (a**2)% mod
        if bit[a] != -1:
            cy_st = bit[a]
            cy_fi = i -1
            cycle = True
            break
        else:
            bit[a] = i
            ans += a

if cycle:
    ans2 = 0
    b =  -1
    for j in range(cy_st):
        if j == 0 :
            b = x
            ans2 += b
        else:
            b = (b**2)% mod
            ans2 += b
    cy_num = ans - ans2
    cy_repe = (n-cy_st) // (cy_fi - cy_st + 1)
    ans3 = cy_num * cy_repe
    cy_amari = (n-cy_st) % (cy_fi - cy_st + 1)
    
    if b == -1:
        for j in range(cy_amari):
            if j == 0 :
                b = x
                ans3 += b
            else:
                b = (b**2)% mod
                ans3 += b
        
    else:
        for i in range(cy_amari):
            b = (b**2)% mod
            ans3 += b

    print(ans2+ans3)
else:
    print(ans)
import numpy as np

if __name__ == '__main__':
    N, M, C = map(int, input().split())
    B = np.array(list(map(int, input().split())))
    A = np.array(list(map(lambda _: list(map(int, input().split())), range(N))))

    scores = np.matmul(A, B)
    print(np.sum(scores > -C))


### FIXED CODE ###

import numpy as np

if __name__ == '__main__':
    N, M, C = map(int, input().split())
    B = np.array(list(map(int, input().split())))
    A = np.array(list(map(lambda _: list(map(int, input().split())), range(N))))

    scores = A.dot(B)
    print(np.sum(scores > -C))
n = int(input())

for i in range(n):
  word = input()
  if i >= 1 :
    if word[1] != before_word[-1]:
      print('No')
      break
      
  before_word = word
  
else:
  print('Yes')
      

### FIXED CODE ###

n = int(input())
words = []
 
for i in range(n):
  word = input()
  if i >= 1:
    if word in words or word[0] != words[-1][-1]:
      print('No')
      break
      
  words.append(word)

else:
  print('Yes')
N,K = map(int,input().split())
r = N%K
s = K-r
print(min[r,s])

### FIXED CODE ###

N,K = map(int,input().split())
r = N%K
s = K-r
print(min([r,s]))
a,b = map(int,input().split())
if a > b:
	print(“a > b”)
elif a < b:
	print(“a < b”)
else:
	print(“a == b”)



### FIXED CODE ###

a,b = map(int, input().split())
if a > b:
 print("a > b")
elif a < b:
 print("a < b")
else:
 print("a == b")
n = int(input())

ct = 1
while ct*(ct+1)//2 < n:
    ct +=1
print(ct)



### FIXED CODE ###

a,b = [i for i in input().split()]
lies ={'H':'D','D':'H'}
print(b if a == 'H' else lies[b])
import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

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

class BIT:
	def __init__(self, N):
		self.size = N
		self.tree = [0] * (N + 1)

	def sum(self, t):
		s = 0
		while t > 0:
			s += self.tree[t]
			t -= t & -t
		return s

	def add(self, t, x):
		while t <= self.size:
			self.tree[t] += x
			t += t & -t

#処理内容
def main():
	N, Q = getlist()
	c = getlist()
	LR = []
	lastappeared = [None] * N
	# for i in range(N):
	# 	lastappeared[c[i] - 1] = i
	ans = [0] * N
	for i in range(Q):
		l, r = getlist()
		l -= 1; r -= 1
		LR.append([r, l, i])

	LR.sort()
	bit = BIT(N)
	val = 0
	right = 1
	for r, l, i in LR:
		while right <= r:
			if lastappeared[c[right] - 1] == None:
				bit.add(right, 1)
			else:
				bit.add(lastappeared[c[right] - 1], -1)
				bit.add(right, 1)
			lastappeared[c[right] - 1] = right

			right += 1

		anspre = bit.sum(r) - bit.sum(l - 1)
		ans[i] = anspre

	for i in range(Q):
		print(ans[i])



if __name__ == '__main__':
	main()

### FIXED CODE ###

import sys; input = sys.stdin.buffer.readline
sys.setrecursionlimit(10**7)
from collections import defaultdict
con = 10 ** 9 + 7; INF = float("inf")

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

class SegmentTree(object):
	#N:処理する区間の長さ
	def __init__(self, N):
		self.N = N
		self.N0 = 2 ** (N - 1).bit_length()
		self.initVal = 0
		self.data = [self.initVal] * (2 * self.N0)

	# 区間クエリの種類
	def calc(self, a, b):
		return a + b

	#k番目の値をxに更新
	def update(self, k, x):
		k += self.N0 - 1
		self.data[k] = x
		while k > 0:
			k = (k - 1) // 2
			self.data[k] = self.calc(self.data[2 * k + 1], self.data[2 * k + 2])

	#区間[l, r]の演算値
	def query(self, l, r):
		L = l + self.N0; R = r + self.N0 + 1
		m = self.initVal
		while L < R:
			if R & 1:
				R -= 1
				m = self.calc(m, self.data[R - 1])
			if L & 1:
				m = self.calc(m, self.data[L - 1])
				L += 1
			L >>= 1; R >>= 1

		return m

#処理内容
def main():
	N, Q = getlist()
	c = getlist()
	LR = []
	lastappeared = [None] * N

	ans = [0] * Q
	for i in range(Q):
		l, r = getlist()
		l -= 1; r -= 1
		LR.append([r, l, i])

	LR.sort(key = lambda x:x[0])
	Seg = SegmentTree(N)
	right = 0
	for r, l, i in LR:
		while right <= r:
			itr = c[right] - 1
			if lastappeared[itr] == None:
				Seg.update(right, 1)
			else:
				Seg.update(lastappeared[itr], 0)
				Seg.update(right, 1)
			lastappeared[itr] = right
			right += 1

		if l == 0:
			anspre = Seg.query(0, r)
		else:
			anspre = Seg.query(l, r)
		ans[i] = anspre

	for i in range(Q):
		print(ans[i])



if __name__ == '__main__':
	main()
#!/usr/bin/env python3
import sys
INF = float("inf")


def yes():
    print("Yes")  # type: str


def no():
    print("No")  # type: str


def solve(H: int, W: int, s: "List[str]"):
    n = [[0]*(W+2) for _ in range(H+2)]
    for i in range(H):
        for j in range(W):
            if s[i][j] == "#":
                n[i+1][j+1] = 1  # 外枠を作りつつ

    flag = True
    for i in range(1, H+1):
        for i in range(1, W+1):
            if n[i][j] == 1 and n[i-1][j]+n[i+1][j]+n[i][j-1]+n[i][j+1] == 0:
                flag = False
                break
        if flag == False:
            break
    if flag == False:
        no()
    else:
        yes()

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    s = [next(tokens) for _ in range(H)]  # type: "List[str]"
    solve(H, W, s)


if __name__ == '__main__':
    main()


### FIXED CODE ###

#!/usr/bin/env python3
import sys
INF = float("inf")


def yes():
    print("Yes")  # type: str


def no():
    print("No")  # type: str


def solve(H: int, W: int, s: "List[str]"):
    n = [[0]*(W+2) for _ in range(H+2)]
    for i in range(H):
        for j in range(W):
            if s[i][j] == "#":
                n[i+1][j+1] = 1  # 外枠を作りつつ

    flag = True
    for i in range(1, H+1):
        for j in range(1, W+1):
            # print(i, j)
            if n[i][j] == 1 and n[i-1][j]+n[i+1][j]+n[i][j-1]+n[i][j+1] == 0:
                flag = False
                break
        if flag == False:
            break
    if flag == False:
        no()
    else:
        yes()

    return


def main():

    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    H = int(next(tokens))  # type: int
    W = int(next(tokens))  # type: int
    s = [next(tokens) for _ in range(H)]  # type: "List[str]"
    solve(H, W, s)


if __name__ == '__main__':
    main()
ss=input().split(" ")
N=int(ss[0])
M=int(ss[1])
x=0
y=N
for i in range(M):
  tt=input().split(" ")
  if int(tt[0])>x:
    x=int(tt[0])
  if int(tt[1])<y:
    y=int(tt[1])
print(int(y-x+1)
  

### FIXED CODE ###

ss=input().split(" ")
N=int(ss[0])
M=int(ss[1])
x=1
y=N
for i in range(M):
  tt=input().split(" ")
  if int(tt[0])>x:
    x=int(tt[0])
  if int(tt[1])<y:
    y=int(tt[1])
last=int(y-x+1)
if last>0:
  print(last)
else:
  print(0)
from collections import deque

MOD = 10**9+7
n, k = map(int,input().split())
e = [[] for i in range(n)]
for i in range(n-1):
    a, b = map(int,input().split())
    a -= 1
    b -= 1
    e[a].append(b)
    e[b].append(a)
    
color = [-1]*n
d = deque()
d.append(0)
while d:
    f = d.pop()
    tmp = deque()
    tmp.append([f, 0])
    p = deque()
    while True:
        cf, cd = tmp.pop()
        if cd >= 2:
          break
        for i in e[cf]:
            if i == f:
                continue
            tmp.appendleft([i, cd+1])
            if not i in p:
                p.append(i)
    cnt = 0
    while p:
        cf = p.pop()
        if color[cf] != -1:
            cnt += 1
    color[f] = k - cnt
    for i in e[f]:
        if color[i] == -1:
            d.appendleft(i)
            
ans = 1
for i in range(n):
    ans = ans * color[i] % MOD
print(ans)

### FIXED CODE ###

# -*- coding: utf-8 -*-
"""
Created on Tue Aug 25 08:44:21 2020

@author: teppe
"""

from collections import deque

def prepare(n, MOD):
 
    # 1! - n! の計算
    f = 1
    factorials = [1]  # 0!の分
    for m in range(1, n + 1):
        f *= m
        f %= MOD
        factorials.append(f)
    # n!^-1 の計算
    inv = pow(f, MOD - 2, MOD)
    # n!^-1 - 1!^-1 の計算
    invs = [1] * (n + 1)
    invs[n] = inv
    for m in range(n, 1, -1):
        inv *= m
        inv %= MOD
        invs[m - 1] = inv
     
    return factorials, invs

MOD = 10**9+7
fact, fact_inv = prepare(10+10**5, MOD)

def perm(n,k):
  if k > n or k < 0:
    return 0
  return fact[n] * fact_inv[n-k] % MOD


n, k = map(int,input().split())
e = [[] for i in range(n)]
for i in range(n-1):
    a, b = map(int,input().split())
    a -= 1
    b -= 1
    e[a].append(b)
    e[b].append(a)
 
colored = [False]*n
colored[0] = True
num = len(e[0])
ans = perm(k, 1+num)
d = deque()
for i in e[0]:
    colored[i] = True
    d.append(i)
while d:
    f = d.pop()
    num = len(e[f]) - 1
    if num == 0:
        continue
    ans *= perm(k-2, num)
    ans %= MOD
    for i in e[f]:
        if not colored[i]:
            colored[i] = True
            d.appendleft(i)
print(ans % MOD)
import numpy as np
n = int(input())
a = list(map(float, input().split()))
ans = int(np.prod(a))
print(ans if ans <= 10**18 else '-1')

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
b = [i for i in a if i != 1]
ans = 1
if len(b) < 100:
    for i in range(len(b)):
        ans *= b[i]
else:
    ans = 10**18+1
if 0 in b:
    ans = 0
print(ans if ans <= 10**18 else '-1')
N, M ,L = map(int, input().split())
print((M//L-(N-1)//L)

### FIXED CODE ###

N, M ,L = map(int, input().split())
print(M//L-(N-1)//L)
import math
abcd = input().split(" ")
a = int(abcd[0])
b = int(abcd[1])
c = int(abcd[2])
d = int(abcd[3])
cd = (c * d) // math.gcd(c, d)
print(b-a+1 - ((b+1)//c - a//c) - ((b+1)//d - a//d) + ((b+1)//cd - a//cd))


### FIXED CODE ###

import fractions
def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)
abcd = input().split(" ")
a = int(abcd[0])
b = int(abcd[1])
c = int(abcd[2])
d = int(abcd[3])
cd = lcm(c, d)
print(b-a-(b//c-((a-1)//c + 1))-(b//d - ((a-1)//d + 1))+(b//cd-((a-1)//cd + 1)))
n=int(input())
a=list(map(int,input().split()))
b=sorted(a)
for i in range(n):
    c=b.remove(a[i])
    print(c[n//2-1])

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=sorted(a)
c=b[n//2]
d=b[n//2-1]
for i in range(n):
    print(c if a[i]<=d else d)
#!/usr/bin/env python3

import sys
import pprint

sys.setrecursionlimit(10 ** 6)

class Logger:
	def __init__(self, debug):
		self.debug = debug
	def print(self, *args):
		if self.debug:
			pprint.pprint(args)


def main():
	log = Logger(0)
	x, n = map(int, sys.stdin.readline().split())
	p = list(map(int, sys.stdin.readline().split()))
	p.sort()
	a = [0]*100
	if n == 0:
		print(x)
		exit()
	for i in range(n):
		a[p[i]-1] = 1
	i = x - 1
	log.print(p, i)
	lower = 0
	while i >= -1:
		log.print(i, a[i])
		if a[i] == 0:
			lower = i + 1
			break
		i -= 1
	i = x - 1
	upper = 0
	while i <= 101:
		log.print(i, a[i])
		if a[i] == 0:
			upper = i + 1
			break
		i += 1
	if abs(x - lower) == abs(x - upper):
		print(lower)
		exit()
	if abs(x - lower) < abs(x - upper):
		print(lower)
	else:
		print(upper)

main()

### FIXED CODE ###

#!/usr/bin/env python3

import sys
import pprint

sys.setrecursionlimit(10 ** 6)

class Logger:
	def __init__(self, debug):
		self.debug = debug
	def print(self, *args):
		if self.debug:
			pprint.pprint(args)


def main():
	log = Logger(0)
	x, n = map(int, sys.stdin.readline().split())
	p = list(map(int, sys.stdin.readline().split()))
	p.sort()
	i = x - 1
	lower = 0
	while i >= 0:
		if not i+1 in p:
			lower = i+1
			break
		i -= 1
	i = x - 1
	upper = 101
	while i <= 101:
		if not i+1 in p:
			upper = i+1
			break
		i += 1
	if abs(x - lower) == abs(x - upper):
		print(lower)
	elif abs(x - lower) < abs(x - upper):
		print(lower)
	else:
		print(upper)

main()
N = int(input())
A = []
for i in range(1,46):
  for j in range(1,46):
    for k in range(1,46):
      A.append(i**2+j**2+k**2+i*j+i*k+j*k)
A = sorted(A)
B = [0]*10001
for i in range(10001):
  if A[i] < 10001:
    B[A[i]] += 1
C = B[1:N+1]
[print(i) for i in C]

### FIXED CODE ###

L,R,d = map(int, input().split())
X = L//d
Y = R//d
if L%d == 0 and R%d == 0:
  if L>R:
    print(X-Y+1)
  else:
    print(Y-X+1)
else:
  if L >R:
    print(X-Y)
  else:
    print(Y-X)
import numpy as np
N = int(input())
L = np.array([int(l) for l in input().split(' ')])
counts =0

for i in range(N):
    for j in range(i+1,N):
        B2  = L[j+1:][(L[j+1:]<L[i]+L[j]) & (L[j+1:]>abs(L[i]-L[j]))]
        counts +=len(B2)
print(counts)

### FIXED CODE ###

A,B = map(int, input().split(' '))
print(max(A-2*B,0))
n=input()
p=list(map(int,input().split()))
result=sum(p)
for i in range(n-2):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)

### FIXED CODE ###

n=int(input())
p = list(map(int,input().split()))
result=sum(p)
for i in range(n-1):
    s1 = sum(p[:i+1])
    s2 = sum(p[i+1:])
    result = min(result,abs(s1-s2))
print(result)
s = input()

if s[0]=='Y' and s[1]=='A' and s[2] == 'K' and s[3] == 'I':
    print("Yes")
else:
    print("No")


### FIXED CODE ###

# coding: utf-8
import sys

s = input()

if len(s) < 4:
    print("No")
    sys.exit()
if s[0]=='Y' and s[1]=='A' and s[2] == 'K' and s[3] == 'I':
    print("Yes")
else:
    print("No")
import math
n, k = map(int, input().split())
a = list(map(int, input().split()))
a.sort()
g = a[0]
for i in range(n):
    g = math.gcd(g, a[i])
if k % g == 0 and k <= a[-1]:
    print('POSSIBLE')
else:
    print('IMPOSSIBLE')

### FIXED CODE ###

n, k = map(int, input().split())
a = list(map(int, input().split()))
new_balls = []
a.sort()
if k > a[-1]:
    print('IMPOSSIBLE')
    exit()
if k in a:
    print('POSSIBLE')
    exit()
for i in range(1, n):
    diff = a[i] - a[i - 1]
    if diff > 0:
        new_balls.append(diff)
for nb in new_balls:
    if (a[-1] - k) % nb == 0:
        print('POSSIBLE')
        exit()
print('IMPOSSIBLE')
l = map(int, input().split()) #python2?????¨???????????§?????????python?????¨????????????????????§???????????????
i = 1
list = list(l)

while(1):
	if list[i-1] != 0:
		print ("Case "+str(i)+": "+str(list[i-1]))
		i = i+1
	else:
		break

### FIXED CODE ###

i=0
while(1):
	a = int(input())
	if a == 0:
		break
	print ("Case "+str(i+1)+": "+str(a))
	i = i+1
N = int(input())

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

def search(par, ans, own):
    ans =  max(ans, len(ki[own]))
    for child in ki[own]:
        if child == par:
            continue
        else:
            ans = max(search(own, ans, child),ans)
    return ans

print(search(-1, 0, 0))


def search(par, ans, own, par_num):
    ans =  max(ans, len(ki[own]))
    i = 1
    for child in ki[own]:
        if child == par:
            continue
        else:
            if i == par_num:
                i += 1
            print(i)
            ans = max(search(own, ans, child, i),ans)
            i += 1
    return ans

search(-1, 0, 0, -1)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)

N = int(input())

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

result = [0]*(N-1)
def search(par, ans, own, par_num):
    ans =  max(ans, len(ki[own]))
    i = 1
    for child in ki[own]:
        if child[0] == par:
            continue
        else:
            if i == par_num:
                i += 1
            result[child[1]] = i
            ans = max(search(own, ans, child[0], i),ans)
            i += 1
    return ans

print(search(-1, 0, 0, -1))
for i in result:
    print(i)
x,y = map(str,input().split())
z = x+y
Z=int(z)
for i in range(100):
  if i**2 = Z:
    print("Yes")
  else:
    print("No")

### FIXED CODE ###

a,b=map(int,input().split())
c=int(str(a)+str(b))
for i in range(int(c**(1/2))+1) :
  if i**2==c :
    print("Yes")
    exit()
print("No")
x=int(input())
a=0
b=0
for i in range(-500,500):
  for j in range(-500,500):
    if i**5-j**5==x:
      a=i
      b=j
      break
  else:
    continue
  break
print(a,b)

### FIXED CODE ###

s=input()
if s=="ABC":
  print("ARC")
else:
  print("ABC")
*I, = open(0).read().split()
N, A, B, C = map(int, I[:4])
S = I[4:]

Cnt = {"A": A, "B": B, "C": C}

ans = [""] * N
def dfs(i):
    if i == N:
        print("Yes")
        print("\n".join(ans))
        quit()

    for L, R in (S[i], reversed(S[i])):
        if Cnt[R] > 0:
            Cnt[L] += 1
            Cnt[R] -= 1

            ans[i] = L
            dfs(i + 1)

            Cnt[L] -= 1
            Cnt[R] += 1


dfs(0)
print("No")


### FIXED CODE ###

from sys import setrecursionlimit
setrecursionlimit(10 ** 6)

*I, = open(0).read().split()
N, A, B, C = map(int, I[:4])
S = I[4:]

Cnt = {"A": A, "B": B, "C": C}

ans = [""] * N
def dfs(i):
    if i == N:
        print("Yes")
        print("\n".join(ans))
        quit()

    for L, R in (S[i], reversed(S[i])):
        if Cnt[R] > 0:
            Cnt[L] += 1
            Cnt[R] -= 1

            ans[i] = L
            dfs(i + 1)

            Cnt[L] -= 1
            Cnt[R] += 1


dfs(0)
print("No")
H,W,N = [int(input()) for i in range(3)]
a = H % W
b = W % H
if H < W :
  print(b)
  else:
    print(a)


### FIXED CODE ###

H,W,N = [int(input()) for i in range(3)]
for o in range(1,10000):
  if H <= W and N / o <= W:
    break
  elif H >= W and N / o <= H:
    break
print(o)
N,M = map(int,input().split())
pre_a = -1
k = []
ef = False
for i in range(M):
    a = int(input())
    if a == 1:pre_a = 1
    else:
        if a-pre_a == 1:
            ef = True
            break
        #print(a,pre_a)
        k.append(a-pre_a-2)
        #print(k)
        pre_a = a
else:
    if a < N:k.append(N-a-1)
#print(k)
nk = sorted(k)
#print('nk:',nk)
def fib(sorted_lis):
    t1 = 1
    t2 = 2
    retl = []
    fi = 0
    i = 0
    for k in range(max(sorted_lis)+1):
        if k == 0:fi = 1
        elif k == 1:fi = t1
        elif k == 2:fi = t2
        else:
            fi = t1 + t2
            t1 = t2
            t2 = fi
        while (i < len(sorted_lis)) and (sorted_lis[i] == k):
            retl.append(fi % 1000000007)
            i += 1
    return retl
if ef:print(0)
else:
    cl = fib(nk)
    #print(cl)
    g = 1
    for kk in cl:g = (g * kk) % 1000000007
    print(g)

### FIXED CODE ###

def org_fib(t):
    t1 = 1
    t2 = 2
    fib = 0
    if t == 1:
        return t1
    elif t == 2:
        return t2
    else:
        for _ in range(t-2):
            fib = t1+t2
            t1 = t2
            t2 = fib
    return fib % 1000000007

N,M = map(int,input().split())
if N == 1:
    print(1)
elif M == 0:
    print(org_fib(N))
else:
    pre_a = -1
    k = []
    ef = True
    for i in range(M):
        a = int(input())
        if (a-pre_a == 1):break
        k.append(a-pre_a-2)
        pre_a = a
    else:
        ef = False
        k.append(N-a-1)

    if ef:print(0)
    else:
        g = 1
        for kk in k:
            if kk == 0:pass
            else:g = (g * org_fib(kk)) % 1000000007
        print(g)
s = input()
k = int(input())

if all(s[i] == '1' for i in range(k + 1)):
    print(1)

print(s.replace('1', '')[0])


### FIXED CODE ###

s = input()
k = int(input())

for i in range(k):
    if s[i] == '1':
        continue
    else:
        print(s[i])
        break
else:
    print(1)
n = int(input())
print((int)n*n)

### FIXED CODE ###

n=int(input())
print(n*n)