Harryxun/stf_run huggingface dataset:
n = int(input())

testimony_dict = {}
for i in range(n):
    a = int(input())
    testimony_dict[i + 1] = []
    for j in range(a):
        xy = input().split(' ')
        testimony_dict[i + 1].append(xy)

max_valid_bin = ''
for i in range(2 ** n - 1, 0, -1):
    is_valid = True
    bin_i = format(i, f'0{n}b')
    for j in range(1, len(bin_i) + 1):
        if bin_i[j - 1] == '1':
            for xy_list in testimony_dict[j]:
                if bin_i[int(xy_list[0]) - 1] != xy_list[1]:
                    is_valid = False
    if is_valid:
        max_valid_bin = bin_i
        break

print(len([i for i in max_valid_bin if i == '1']))


### FIXED CODE ###

n = int(input())

testimony_dict = {}
for i in range(n):
    a = int(input())
    testimony_dict[i + 1] = []
    for j in range(a):
        xy = input().split(' ')
        testimony_dict[i + 1].append(xy)

max_valid_bin = ''
for i in range(2 ** n - 1, 0, -1):
    is_valid = True
    bin_i = format(i, '0{}b'.format(n))
    for j in range(1, len(bin_i) + 1):
        if bin_i[j - 1] == '1':
            for xy_list in testimony_dict[j]:
                if bin_i[int(xy_list[0]) - 1] != xy_list[1]:
                    is_valid = False
    if is_valid:
        max_valid_bin = bin_i
        break

print(len([i for i in max_valid_bin if i == '1']))
N = int(input())

point = []
dist = []

for _ in range(N) :
    x, y = map(int, input().split())
    point.append((x, y))
    dist.append(abs(x) + abs(y))

maxDist = dist[0]
mask = maxDist % 2

for i in range(1, N) :
    if dist[i] % 2 != mask :
        break
    maxDist = max(maxDist, dist[i])
else :  # 実現可能
    print(maxDist) # 腕の数
    out = [1] * maxDist
    print(*out)

    for i, (x, y) in enumerate(point) :
        # if x < 0 :
        #     holizon = ['L'] * abs(x)
        # elif x > 0 :
        #     holizon = ['R'] * abs(x)
        # else :
        #     holizon = ['']

        # if y < 0 :
        #     vertical = ['D'] * abs(y)
        # elif y > 0 :
        #     vertical = ['U'] * abs(y)
        # else :
        #     vertical = ['']

        holizon = ['']
        vertical = ['']

        last = ['']
        R = (maxDist - dist[i]) // 2
        if R > 0 :
            last = ['LR'] * R
        print(''.join(holizon + vertical + last))



### FIXED CODE ###

N=int(input())

point = []
parity = {}
for _ in range(N) :
    x, y = map(int, input().split())
    point.append((x, y))
    parity[(x + y) % 2] = 1

if len(set(parity)) == 2 :
    print('-1')
else :
    m = 38
    parity = 1 if (1 in parity) else 0
    print(m + 1 - parity)
    if parity == 1 :  # 距離が奇数
        print(*[1 << i for i in range(m)])
    else :
        print(1, *[1 << i for i in range(m)])

    def arm(x, y, m) :
        if abs(x) >= abs(y) :
            if x >= 0 :
                return ('R', x - (1<<m), y)
            else :
                return ('L', x + (1<<m), y)
        else :
            if y >= 0 :
                return ('U', x, y - (1<<m))
            else :
                return ('D', x, y + (1<<m))

    for x, y in point :
        ans = []
        for i in range(m-1, -1, -1) :
            mode, x, y = arm(x, y, i)
            ans.append(mode)
        if parity == 0 :  # 偶数の場合一つ足す
            if x == 1 :
                ans.append('R')
            elif x == -1 :
                ans.append('L')
            elif y == 1 :
                ans.append('U')
            elif y == -1 :
                ans.append('D')
        print(''.join(ans[::-1]))
list = input().split(' ')

print(str(list[0] * list[1]) + ' ' + str((list[0] + list[1]) * 2)

### FIXED CODE ###

list = input().split(' ')

x = int(list[0])

y = int(list[1])

x1 = x * y
y1 = (x + y) * 2

print(str(x1) + ' ' + str(y1))
# -*- coding: utf-8 -*-

N = int(input())

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

mul = A[0]
for i in A[1:]:
    mul *= i
    
    if mul > 1000000000000000000:
        print(-1)
        exit(-1)

print(mul)

### FIXED CODE ###

# -*- coding: utf-8 -*-

import numpy as np

N = int(input())

A = np.array(list(map(int, input().split())))

if 0 in A:
    print(0)
    exit(0)

mul = A[0]

if np.sum(A < 0) % 2 == 1:
    for i in A[1:]:
        mul *= i
else:
    for i in A[1:]:
        if 1000000000000000000 / i < mul:
            print(-1)
            exit(0)
        mul *= i

if mul > 1000000000000000000:
    print(-1)
    exit(0)

print(mul)
N,K = map(int,input().split())
check = N*[0]

for i in range(N):
	d = int(input())
	a = list(map(int,input().split()))
	for i in a:
		check[i-1] = 1

print(check.count(0))


### FIXED CODE ###

N,K = map(int,input().split())
check = N*[0]

for i in range(K):
	d = int(input())
	a = list(map(int,input().split()))
	for i in a:
		check[i-1] = 1

print(check.count(0))
from decimal import *

a, b = input().split()
Decimal(int(a))
Decimal(b)

print(a*b)

### FIXED CODE ###

from decimal import Decimal

a, b = input().split()
a = Decimal(int(a))
b = Decimal(b)

print(int(a*b))
N, Ma, Mb = map(int, input().split())
items = []
for i in range(N):
    a, b, c = map(int, input().split())
    items.append((a, b, c))

a_sum = sum([item[0] for item in items])
b_sum = sum([item[1] for item in items])
inf = float("inf")
dp = [[[inf for _ in range(a_sum + 40)] for _ in range(b_sum + 40)] for i in range(N+1)]
dp[0][0][0] = 0

for i in range(N):
    for a in range(a_sum + 1):
        for b in range(b_sum + 1):
            dp[i + 1][a][b] = min(dp[i + 1][a][b], dp[i][a][b])
            dp[i + 1][a + items[i][0]][b + items[i][1]] = min(dp[i + 1][a + items[i][0]][b + items[i][1]],
                                                              dp[i][a][b] + items[i][2])
ans = inf
for a in range(1, a_sum + 1):
    for b in range(1, b_sum + 1):
        if a * Mb == b * Ma:
            ans = min(ans, dp[N][a][b])
if ans != inf:
    print(ans)
else:
    print(-1)

### FIXED CODE ###

N, Ma, Mb = map(int, input().split())
items = []
for i in range(N):
    a, b, c = map(int, input().split())
    items.append((a, b, c))

a_sum = sum([item[0] for item in items])
b_sum = sum([item[1] for item in items])
inf = float("inf")
dp = [[[inf for _ in range(a_sum + 100)] for _ in range(b_sum + 100)] for i in range(N+1)]
dp[0][0][0] = 0

for i in range(N):
    for a in range(a_sum + 1):
        for b in range(b_sum + 1):
            dp[i + 1][a][b] = min(dp[i + 1][a][b], dp[i][a][b])
            dp[i + 1][a + items[i][0]][b + items[i][1]] = min(dp[i + 1][a + items[i][0]][b + items[i][1]],
                                                              dp[i][a][b] + items[i][2])
ans = inf
for a in range(1, a_sum + 1):
    for b in range(1, b_sum + 1):
        if a * Mb == b * Ma:
            ans = min(ans, dp[N][a][b])
if ans != inf:
    print(ans)
else:
    print(-1)
# -*- coding: utf-8 -*-
def is_integer(n):
    if isinstance(n, int):
        return True
    if isinstance(n, float):
        return n.is_integer()
    return False

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

if a >= b:
	print 1
else:
	sub = b - a
if sub < a-1:
	print 2
else:
	div = sub/float(a-1)
  	print 1 + int(div)


### FIXED CODE ###

# -*- coding: utf-8 -*-
a,b = map(int, raw_input().split())
tmp = a

if b == 1:
	print 0
elif a >= b:
	print 1
else:
	count = 1
	while True:
		count +=1
		tmp += (a - 1)
		if tmp >= b:
			print count
			break
# from itertools import combinations_with_replacement as comb

# n, m, x = map(int, input().split())
# for i in range(n):
#     ca = list(map(int, input().split()))

# ans = 20 * 10**5

# for i in range(n):
#     isOK = True
#     for j in range(1,m+1):
#         if ca[i][j] < x:
#             isOK = False
#             break
#     if isOK:
#         ans = min(ans, ca[i][0])

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

# print(a)
cnt = [0]*(10**5)
cnt2 = [0]*(10**5)#何回目に出てきたか
t = []
nxt = 0
loop = 0

for i in range(10**5):
    cnt[nxt] += 1
    if cnt[nxt] >= 2:
        # print("i: " + str(i))
        # print("nxt: " + str(nxt))
        loop = i - cnt2[nxt]
        modC = max(0, cnt2[nxt] - 1)
        break
    cnt2[nxt] = i
    t.append(nxt)
    nxt = a[nxt]

K = (k-modC)//loop
modK = (k-modC)%loop
# print("-------")
# print(t)
# print("modC: " + str(modC))
# print("K: " + str(K))
# print("modK: " + str(modK))
# print("loop: " + str(loop))
# print(modK)
# print(loop)
# print("-------")

print(t[modC + modK] + 1)

### FIXED CODE ###

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

cnt = [0]*(2*10**5)#何回出たか
cnt2 = [0]*(2*10**5)#何回目に出てきたか
t = []
nxt = 0
loop = 0

for i in range(2*10**5):
    cnt[nxt] += 1
    if cnt[nxt] >= 2:
        # print("i: " + str(i))
        # print("nxt: " + str(nxt))
        loop = i - cnt2[nxt]
        modC = cnt2[nxt]
        break
    cnt2[nxt] = i
    t.append(nxt)
    nxt = a[nxt]

modK = (k-modC)%loop
# print("-------")
# print(t)
# print("modC: " + str(modC))
# print("modK: " + str(modK))
# print("loop: " + str(loop))
# print(modK)
# print(loop)
# print("-------")

if k < modC:
    print(t[k] + 1)
else:
    print(t[modC + modK] + 1)

"""
発想はあってる
テストケース公開されたら試してみる！
"""
print(x^3)


### FIXED CODE ###

number = int(input())
print(number**3)
import sys

a = sys.argv[1]
b = sys.argv[2]

print a*b

### FIXED CODE ###

n = map(int,raw_input().split())
print n[0]*n[1] , 2*(n[0]+n[1])
from itertools import permutations

n, m = map(int, input().split())
ans = 0

path = [[False]*n for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    path[a][b] = True
    path[b][a] = True

for i in permutations(range(n), n):
    if i[0] == 0:
        for j in range(n):
            if j == 1:
                ans += 1
                break
            if not path[i[j]][i[j+1]]:
                break
print(ans)

### FIXED CODE ###

from itertools import permutations

n, m = map(int, input().split())
ans = 0

path = [[False]*n for i in range(n)]
for i in range(m):
    a, b = map(int, input().split())
    a -= 1
    b -= 1
    path[a][b] = True
    path[b][a] = True

for i in permutations(range(n), n):
    if i[0] == 0:
        for j in range(n):
            if j == n - 1:
                ans += 1
                break
            if not path[i[j]][i[j+1]]:
                break
print(ans)
N=int(input())
import math
print(2*n//math.gcd(2,N))

### FIXED CODE ###

N=int(input())
from fractions import gcd
print(2*N//gcd(2,N))
a,b,c = input().split()
if b == "+":
	print(int(a)+int(b))
else:
	print(int(a)-int(b))

### FIXED CODE ###

a,b,c = input().split()
if b == "+":
	print(int(a)+int(c))
else:
	print(int(a)-int(c))
import sys

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


def input():
    return sys.stdin.readline().strip()


def solve(N):
    N = int(input())
    M = 3501

    for h in range(1, M):
        for n in range(h, M):
            denominator = 4 * n * h - N * h - N * n
            if denominator <= 0:
                continue
            numerator = N * h * n

            if numerator % denominator == 0:
                return h, n, numerator // denominator


def main():
    N = int(input())
    h, n, w = solve(N)
    print(h, n, w)


if __name__ == "__main__":
    main()


### FIXED CODE ###

def solve():
    N = int(input())
    M = 3501

    for h in range(1, M):
        for n in range(h, M):
            numerator = N * h * n
            denominator = 4 * n * h - N * h - N * n
            if numerator <= 0 or denominator <= 0:
                continue
            if numerator % denominator == 0:
                return h, n, numerator // denominator


h, n, w = solve()
print(h, n, w)
n=int(input())
money=0

for i in range(n):
    gt=input().split()
    if gt[1]=="BTC":
        money+=float(g[0])*380000
    else:
        money+=float(g[0])

print(money)

### FIXED CODE ###

n=int(input())
money=0

for i in range(n):
    gt=input().split()
    if gt[1]=="BTC":
        money+=float(gt[0])*380000
    else:
        money+=float(gt[0])

print(money)
S=list(input())
N=len(S)
s=0 #取り除いたキューブの数
i=0 
while len(set(S))!=len(S):
  if S[i]==S{i+1]==0 or S{i]==S[i+1]==1:
    s=s
    i+=1
  else:
    s+=2
    i=0
print(s)
    


### FIXED CODE ###

S=input()
N=len(S)
a=S.count('0')
b=S.count('1')
t=min(a,b)
print(2*t)
import sys
sys.setrecursionlimit(10**9)

def main():
    N = int(input())
    S = list(input())

    a_ord = ord('a')
    z_ord = ord('z')

    set_list = [[] for _ in range(z_ord+1)]
    for i in range(N):
        s = S[i]
        bisect.insort_left(set_list[ord(s)],i)

    Q = int(input())
    for q in range(Q):
        ipt = input().split()
        if ipt[0] == "1":
            i,c = int(ipt[1]), ipt[2]
            j = ord(S[i-1])

            if j == ord(c): continue
            set_list[j].remove(i-1)
            bisect.insort_left(set_list[ord(c)],i-1)
            S[i-1] = c
            # print(set_list[])

        else:
            l,r = int(ipt[1]), int(ipt[2])
            ans = 0
            # if l == r:
            #     print(1)
            #     continue

            for i in range(a_ord,z_ord+1):
                st = set_list[i]
                if not len(st) > 0: continue

                # print(i,set_list[i])
                l_p = bisect.bisect_left(st,l-1)
                r_p = bisect.bisect_right(st,r-1)

                # print(l-1,r-1,l_p,r_p)
                if l_p < r_p:
                    ans += 1

            # print(ans,"____")
            print(ans)



if __name__ == "__main__":
  main()

### FIXED CODE ###

import bisect
import sys
sys.setrecursionlimit(10**9)

def main():
    N = int(input())
    S = list(input())

    a_ord = ord('a')
    z_ord = ord('z')

    set_list = [[] for _ in range(z_ord+1)]
    for i in range(N):
        s = S[i]
        set_list[ord(s)].append(i)

    Q = int(input())
    for q in range(Q):
        ipt = input().split()
        if ipt[0] == "1":
            i,c = int(ipt[1]), ipt[2]
            j = ord(S[i-1])

            if j == ord(c): continue
            set_list[j].remove(i-1)
            bisect.insort_left(set_list[ord(c)],i-1)
            S[i-1] = c
            # print(set_list[])

        else:
            l,r = int(ipt[1]), int(ipt[2])
            ans = 0
            # if l == r:
            #     print(1)
            #     continue

            for i in range(a_ord,z_ord+1):
                st = set_list[i]
                if not len(st) > 0: continue

                # print(i,set_list[i])
                l_p = bisect.bisect_left(st,l-1)
                r_p = bisect.bisect_right(st,r-1)

                # print(l-1,r-1,l_p,r_p)
                if l_p < r_p:
                    ans += 1

            # print(ans,"____")
            print(ans)



if __name__ == "__main__":
  main()
from functools import reduce
from math import gcd
N = int(input())
A = list(map(int,input().split()))
gcd_max = 0
for i in range(N):
    gcd_now = reduce(gcd, list(x for x in A if x != A[i]))
    if (gcd_max < gcd_now): gcd_max = gcd_now
    
print(gcd_max)

### FIXED CODE ###

from fractions import gcd
# input
N = int(input())
A = list(map(int,input().split()))
L_A = [0] * (N+1)
R_A = [0] * (N+1)
for i in range(N):
    L_A[1+i] = gcd(L_A[i], A[i])
for i in reversed(range(N)):
    R_A[i] = gcd(R_A[i+1], A[i])
print(max(gcd(L_A[i], R_A[i+1]) for i in range(N)))
from math import factorial

X, Y = [int(i) for i in input().split()]
n = 2 * X - Y
m = 2 * Y - X

if (X + Y) % 3 != 0 or n % 3 != 0 or m % 3 != 0:
    print(0)
    exit()

def comb(a, b):
    return factorial(a) // (factorial(a - b) * factorial(b))

n, m = n / 3, m / 3

print(comb(n + m, n) % (10**9 + 7))

### FIXED CODE ###

X, Y = map(int, input().split())
n = (2 * X - Y) / 3
m = (2 * Y - X) / 3

if n < 0 or m < 0 or not n.is_integer() or not m.is_integer():
    print(0)
    exit()

n, m = map(int, [n, m])
mod = 10**9 + 7
fact = [1]
inv = [1]
for i in range(1, X + Y + 1):
    fact.append((fact[i-1] * i) % mod)
    inv.append(pow(fact[-1], mod-2, mod))

def cmb(n, r):
    return fact[n] * inv[n-r] * inv[r]

print(cmb(n+m, min(n, m)) % mod)
N, M = map(int, input().split())
A = map(int, input().split())
A = sorted(A) # ascending

B_C = []
for _ in range(M):
    b, c = map(int, input().split())
    B_C.append((b, c))
B_C = sorted(B_C, key=lambda x: x[1], reverse=True)

cur_a_ix = 0
ans = 0

for b, c in B_C:
    while b:
        if A[cur_a_ix] < c:
            ans += c
        else:
            break
        b -= 1
        cur_a_ix += 1
ans += sum(A[cur_a_ix:])
print(ans)
    


### FIXED CODE ###

N, M = map(int, input().split())
A = map(int, input().split())
A = sorted(A) # ascending

B_C = []
for _ in range(M):
    b, c = map(int, input().split())
    B_C.append((b, c))
B_C = sorted(B_C, key=lambda x: x[1], reverse=True)

cur_a_ix = 0
ans = 0

for b, c in B_C:
    while b and cur_a_ix < len(A):
        if A[cur_a_ix] < c:
            ans += c
        else:
            break
        b -= 1
        cur_a_ix += 1
ans += sum(A[cur_a_ix:])
print(ans)
s=str(input())
n=str(input())
count=0
for i in range(3):
  if s[i]==t[i]:
    count+=1
print(count)

### FIXED CODE ###

s=str(input())
t=str(input())
c=0
for i in range(len(s)):
  if s[i]==t[i]:
    c += 1
print(c)
S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
if S.count('A')>3:
    print('NO')
else:
    for i in range(len(S)-1):
        if S[i]==S[i+1]:
            print('NO')
        elif S[i]=='K' and S[i+1]!='I':
            print('NO')
    for i in range(len(S)):
        if Q[i]==U[i]:
            pass
        else:
            print('NO')
            break
    else:
        print('YES')

### FIXED CODE ###

S=input()
Q=[s for s in S if s != 'A']
U=list('KIHBR')
import sys
if S.count('A')>4:
    print('NO')
    sys.exit()
elif len(Q)!=5:
    print('NO')
    sys.exit()
for i in range(len(S)):
    if S[i] not in list('AKIHABARA'):
        print('NO')
        sys.exit()
for i in range(len(S)-1):
    if S[i]==S[i+1]:
        print('NO')
        sys.exit()
    elif S[i]=='K' and S[i+1]!='I':
        print('NO')
        sys.exit()
    elif S[i]=='I' and S[i+1]!='H':
        print('NO')
        sys.exit()
for i in range(len(U)):
    if Q[i]==U[i]:
        pass
    else:
        print('NO')
        break
else:
    print('YES')
import sys
from collections import deque


def bfs(links, s, limit):
    not_reachable = (1 << len(links)) - 1
    q = deque([(0, s, -1)])
    pop = q.popleft
    extend = q.extend
    while q:
        cost, v, p = pop()
        if cost > limit:
            break
        not_reachable ^= 1 << v
        cost += 1
        extend((cost, u, v) for u in links[v] if u != p)
    return not_reachable


def solve(n, k, ab):
    if k == 1:
        return n - 2

    links = [set() for _ in range(n)]
    link_list = []
    for a, b in ab:
        a -= 1
        b -= 1
        links[a].add(b)
        links[b].add(a)

    limit = k // 2
    if k % 2 == 0:
        ans = min(bin(bfs(links, v, limit)).count('1') for v in range(n))
    else:
        dists = [bfs(links, v, limit) for v in range(n)]
        ans = min(bin(dists[a] & dists[b]).count('1') for a, b in ab)
    return ans


n, k = map(int, sys.stdin.buffer.readline().split())
ab = map(int, sys.stdin.buffer.read().split())
ab = list(zip(ab, ab))
print(solve(n, k, ab))


### FIXED CODE ###

import sys
from collections import deque


def bfs(links, s, limit):
    not_reachable = [True] * len(links)
    q = deque([(0, s, -1)])
    while q:
        cost, v, p = q.popleft()
        if cost > limit:
            break
        not_reachable[v] = False
        cost += 1
        q.extend((cost, u, v) for u in links[v] if u != p)
    return not_reachable


def solve(n, k, ab):
    if k == 1:
        return n - 2

    links = [set() for _ in range(n)]
    for a, b in zip(ab[0::2], ab[1::2]):
        a -= 1
        b -= 1
        links[a].add(b)
        links[b].add(a)

    ans = n
    thr = k // 2
    if k % 2 == 0:
        ans = min(sum(bfs(links, v, thr)) for v in range(n))
    else:
        dists = [bfs(links, v, thr) for v in range(n)]
        for a, b in zip(ab[0::2], ab[1::2]):
            a -= 1
            b -= 1
            ans = min(ans, sum(d1 and d2 for d1, d2 in zip(dists[a], dists[b])))
    return ans


n, k, *ab = map(int, sys.stdin.buffer.read().split())
print(solve(n, k, ab))
n = int(input())
num_list = list(map(int, input().split()))
num_unique = list(set(num_list))
num_unique.sort()
num_unique.reverse()
max_num = 0
flag = False
for i in range(num_unique[-2], 0, -1):
    if i == 1:
        max_num = 1
        break
    elif flag and count < 2:
        break
    else:
        flag = True
        count = 0
        max_num = i
    for num in num_unique:
        if int(num / max_num) < 1 or num % max_num != 0:
            count += 1
            if count > 1:
                break
print(max_num)

### FIXED CODE ###

n = int(input())
a = list(map(int, input().split()))
end = sorted(a)[1]

for i in range(end + 1, 0, -1):
    x = 0
    for j in a:
        if j % i != 0:
            x += 1
        if x >= 2:
            break
    if x <= 1:
        print(i)
        break
_ = input()
As = [int(x) for x in input().split()]
even_pair_count = 0
odd_pair_count = 0
even_pair = []
odd_pair = []
for a in As:
    if a%2 == 0:
        even_pair.append(1)    
        if len(even_pair) == 2:
            even_pair = []
            even_pair_count += 1
    else:
        odd_pair.append(1)
        if len(odd_pair) == 2:
            odd_pair = []
            odd_pair_count += 1


pair_num = even_pair_count + odd_pair_count
rest_num = len(even_pair) + len(odd_pair)
# print(pair_num)
# print(rest_num)
elif rest_num == 2:
    print("NO")
if pair_num == 1:
    print("YES")
elif (pair_num+rest_num) % 2 == 0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

_ = input()
As = [int(x) for x in input().split()]
if sum(As)%2 == 0:
    print("YES")
else:
    print("NO")
s = list(input())
s = list(set(s))
s.sort()
print('s:', s)
ans = 'a'
cnt = 0
while True:
    if cnt == 26:
        print(None)
        break
    else:
        if s[cnt] != ans:
            print(ans)
            break
        else:
            ans = chr(ord(ans)+1)
            cnt += 1

### FIXED CODE ###

S = input()
ans = None
for letter in "abcdefghijklmnopqrstuvwxyz":
    if letter not in S:
        ans = letter
        break
print(ans)
in_str = input()
input_list = map(int,in_str)
per = input_list[0]
money = input_list[1]
target = input_list[2]
time = int(money/par)
ans = 0
if(time>=target):
  ans = target
else:
  ans = time
print(ans)

### FIXED CODE ###

in_str = input()
input_list = list(map(int,in_str.split()))
per = input_list[0]
money = input_list[1]
target = input_list[2]
time = int(money/per)
ans = 0
if(time>=target):
  ans = target
else:
  ans = time
print(ans)
n=int(input())
v=list(map(int,input().split()))
from collections import Counter
even=[]
odd=[]
for i in range(n):
    if i%2==0:
        even.append(v[i])
    else:
        odd.append(v[i])
E=Counter(even).most_common()
O=Counter(odd).most_common()
if E[0][0]!=O[0][0]:
    print(n-(E[0][1]+O[0][1]))
else:
    print(min(n-(E[1][1]+O[0][1]),n-(E[0][1]+O[1][1])))

### FIXED CODE ###

n=int(input())
v=list(map(int,input().split()))
from collections import Counter
even=[]
odd=[]
for i in range(n):
    if i%2==0:
        even.append(v[i])
    else:
        odd.append(v[i])
E=Counter(even).most_common()
O=Counter(odd).most_common()
E.append([0,0])
O.append([0,0])
if E[0][0]!=O[0][0]:
    print(n-(E[0][1]+O[0][1]))
else:
    print(min(n-(E[1][1]+O[0][1]),n-(E[0][1]+O[1][1])))
A, B, K = map(int(), input().split())

if A >= K:
  a = A - K
  b = B
elif A+B >= K:
  a = 0
  b = A + B - K
else:
  a = 0
  b = 0

print(str(a) + " " + str(b))

### FIXED CODE ###

A, B, K = map(int, input().split())
     
if A >= K:
  a = A - K
  b = B
elif A+B >= K:
  a = 0
  b = A + B - K
else:
  a = 0
  b = 0
     
print(str(a) + " " + str(b))