Harryxun/stf_run huggingface dataset:
n = int(input())
F = [1, 1] + [0 for i in range(44)]
for i in range(2, n + 1):
    fib[i] = fib[i - 1] + fib[i - 2]
print(fib[n])

### FIXED CODE ###

n = int(input())
fib = [1, 1] + [0 for i in range(44)]
for i in range(2, n + 1):
    fib[i] = fib[i - 1] + fib[i - 2]
print(fib[n])
from collections import deque

H, W = map(int, input().split())
grid = [input() for _ in range(H)]

f_inf = float('inf')
ans = []
for h in range(H):
    for w in range(W):
        if grid[h][w] == "#":
            break
        else:
            maze = [[f_inf] * W for _ in range(H)]
            sh, sw = h, w
            maze[sh][sw] = 0
            que = deque([[sh, sw]])
            while que:
                h, w = que.popleft()
                for dh, dw in ((1, 0), (-1, 0), (0, 1), (0, -1)):
                    next_h, next_w = h + dh, w + dw
                    if next_h < 0 or next_h >= H or next_w < 0 or next_w >= W or grid[next_h][next_w] == "#":
                        continue
                    else:
                        if maze[next_h][next_w] > maze[h][w] + 1:
                            maze[next_h][next_w] = maze[h][w] + 1
                            que.append([next_h, next_w])
                            ans.append(maze[next_h][next_w])

print(max(ans))


### FIXED CODE ###

from collections import deque

H, W = map(int, input().split())
grid = [input() for _ in range(H)]

f_inf = float('inf')
ans = []
for h in range(H):
    for w in range(W):
        if grid[h][w] == "#":
            continue
        else:
            maze = [[f_inf] * W for _ in range(H)]
            sh, sw = h, w
            maze[sh][sw] = 0
            que = deque([[sh, sw]])
            while que:
                h, w = que.popleft()
                for dh, dw in ((1, 0), (-1, 0), (0, 1), (0, -1)):
                    next_h, next_w = h + dh, w + dw
                    if next_h < 0 or next_h >= H or next_w < 0 or next_w >= W:
                        continue
                    elif grid[next_h][next_w] == "#":
                        continue
                    elif grid[next_h][next_w] == ".":
                        if maze[next_h][next_w] > maze[h][w] + 1:
                            maze[next_h][next_w] = maze[h][w] + 1
                            que.append([next_h, next_w])
                            ans.append(maze[next_h][next_w])

print(max(ans))
import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    N, X = list(map(int,readline().split()))
    L = map(int,readline().split())
    sum = 0
    cnt = 1
    for n in N:
        sum += n
        if sum <= X:
            cnt += 1
    print(cnt)

    return

if __name__ == '__main__':
    main()



### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines

def main():
    N, X = list(map(int,readline().split()))
    L = map(int,readline().split())
    sum = 0
    cnt = 1
    for l in L:
        sum += l
        if sum <= X:
            cnt += 1
    print(cnt)

    return

if __name__ == '__main__':
    main()
sunuke=[]
for i in range(30):
    for j in range(2,11):
        sunuke.append(j*(10**i)-1)

for i in range(int(input())):
    print(sunuke[i])


### FIXED CODE ###

def f(n):
    s=str(n)
    return sum([int(s[i]) for i in range(len(s))])

sunuke=[]
for i in range(16):
    for j in range(1,500):
        sunuke.append(j*(10**i)-1)

sunuke=list(set(sunuke))
sunuke.sort()
sunuke.pop(0)
L=len(sunuke)

tmp1,tmp2=sunuke[L-1],f(sunuke[L-1])
ans=[sunuke[L-1]]
for i in range(len(sunuke)-2,-1,-1):
    x=sunuke[i]
    if x*tmp2<=tmp1*f(x):
        ans.append(x)
        tmp1,tmp2=x,f(x)

ans.sort()

    

for i in range(int(input())):
    print(ans[i])
S = input()

if(S[2] == S[3] and S[4] == S[5]):
    return 'Yes'
else:
    return 'No'

### FIXED CODE ###

S = input()
 
if(S[2] == S[3] and S[4] == S[5]):
    print('Yes')
else:
    print('No')
from math import sqrt
EPS = 10**(-8)
N = 100
def intersection(p, q, s, t):
    a = 2*(p-s)
    b = 2*(q-t)
    c = (p**2+q**2) - (s**2+t**2)
    A = a**2 + b**2
    x0, y0, x1, y1 = [0.0]*4
    if A<EPS:
        return p, q, s, t
    Bx = p*b**2 + a*(c-q*b)
    Cx = (p**2+q**2-1)*b**2 - 2*b*c*q + c**2
    Dx = Bx**2-A*Cx
    By = q*a**2 + b*(c-p*a)
    Cy = (p**2+q**2-1)*a**2 - 2*a*c*p + c**2
    Dy = By**2-A*Cy
    if b>EPS:
        x0 = (-sqrt(Dx)+Bx)/A; y0 = (-x0*a + c)/b;
        x1 = (sqrt(Dx)+Bx)/A; y1 = (-x1*a + c)/b;
    else:
        x0 = (-y0*b + c)/a; y0 = (-sqrt(Dy)+By)/A;
        x1 = (-y1*b + c)/a; y1 = (sqrt(Dy)+By)/A;
    return x0, y0, x1, y1
def dist(p, q, s, t):
    return (p-s)**2 + (q-t)**2
x,y = [0.0]*N,[0.0]*N
xi = [0.0]*2; yi = [0.0]*2
while True:
    n = input()
    if n==0:
        break
    ans = 1
    for i in xrange(n):
        x[i], y[i] = map(float, raw_input().split(','))
    for i in xrange(n):
        for j in xrange(i+1, n):
            rr = dist(x[i], y[i], x[j], y[j])
            if rr<4.00+EPS:
                if rr<EPS:
                    cnt = 2
                    for k in xrange(n):
                        if k==i or k==j:
                            continue
                        if dist(x[i], y[i], x[k], y[k])<1.00+EPS:
                            cnt += 1
                    ans = max(ans, cnt)
                else:
                    xi[0], yi[0], xi[1], yi[1] = intersection(x[i], y[i], x[j], y[j])
                    for t in xrange(2):
                        #print xi[t],yi[t], "(", i, j,")"
                        cnt = 2
                        for k in xrange(n):
                            if k==i or k==j:
                                continue
                            rri = dist(xi[t], yi[t], x[k], y[k])
                            if rri<1.00+EPS:
                                cnt += 1
                                #print k, rri
                        #print ">>",cnt
                        ans = max(ans, cnt)
    print ans

### FIXED CODE ###

import math
while 1:
    N = int(input())
    if N == 0:
        break

    PS = []
    for i in range(N):
        x, y = map(float, input().split(','))
        PS.append((int(x * 100000), int(y * 100000)))

    D2 = 100000**2
    ans = 0
    for i in range(101):
        py = i * 10000
        for j in range(101):
            px = j * 10000
            cnt = 0
            for x, y in PS:
                if (px - x) ** 2 + (py - y) ** 2 <= D2:
                    cnt += 1
            ans = max(ans, cnt)
    print(ans)
def input_from_console():
    n, m = map(int, input().split())
    a_list = map(int, input().split())

    bc_list = []
    for i in range(m):
        b, c = map(int, input().split())
        bc_list.append((b, c))
    return n, m, a_list, bc_list


def solve(n, m, a_list, bc_list):
    bc_list.sort(key=lambda x: x[1], reverse=True)
    a_list = sorted(a_list, reverse=True)

    result_sum = 0
    position = 0
    a_length = len(a_list)
    for item in bc_list:
        b, c = item
        while True:
            if a_length <= position:
                return result_sum + sum(a_list)
            if a_list[position] >= c:
                position += 1
                if a_length < position:
                    result_sum + sum(a_list)
            else:
                result_sum += sum(a_list[:position])
                a_list = sorted(a_list[position:])
                a_length = len(a_list)
                position = 0
                break
        for i in range(b):
            if position > a_length:
                return result_sum + sum(a_list)
            if a_list[position] < c:
                a_list[position] = c
                position +=1
            else:
                break
    return result_sum + sum(a_list)


def main():
    n, m, a_list, bc_list = input_from_console()
    print(solve(n, m, a_list, bc_list))


if __name__ == "__main__":
    main()


### FIXED CODE ###

def input_from_console():
    n, m = map(int, input().split())
    a_list = map(int, input().split())

    bc_list = []
    for i in range(m):
        b, c = map(int, input().split())
        bc_list.append((b, c))
    return n, m, a_list, bc_list


def solve(n, m, a_list, bc_list):
    bc_list.sort(key=lambda x: x[1], reverse=True)
    a_list = sorted(a_list)

    position = 0
    a_length = len(a_list)

    for item in bc_list:
        b, c = item
        for i in range(b):
            if position >= a_length or a_list[position] >= c:
                return sum(a_list)
            else:
                a_list[position] = c
                position += 1
    return sum(a_list)


def main():
    n, m, a_list, bc_list = input_from_console()
    print(solve(n, m, a_list, bc_list))


if __name__ == "__main__":
    main()
a,b,c = map(int,input())
print("Yes" if a<=c<=b else "No")

### FIXED CODE ###

a,b,c=map(int,input().split())
print("Yes" if a <= c <= b else "No")
import math
# import numpy as np  # Pythonのみ！
# from operator import xor
# import re
# from scipy.sparse.csgraph import connected_components  # Pythonのみ！
# ↑cf.  https://note.nkmk.me/python-scipy-connected-components/
# from scipy.sparse import csr_matrix
# import string
import sys

sys.setrecursionlimit(10 ** 5 + 10)


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


def resolve():
    def main():
        N, M = map(int, input().split())
        S = str(input())
        T = str(input())

        lcm = N * M // math.gcd(N, M)

        lcm2 = (lcm // N) * (lcm // M) // math.gcd((lcm // N), (lcm // M))
        i = 0
        while True:
            while lcm2 * i < min(N, M):
                if S[lcm2 * i // (lcm // N)] != T[lcm2 * i // (lcm // M)]:
                    return -1
                i += 1
            else:
                return lcm

    print(main())


resolve()

### FIXED CODE ###

import fractions
# import numpy as np  # Pythonのみ！
# from operator import xor
# import re
# from scipy.sparse.csgraph import connected_components  # Pythonのみ！
# ↑cf.  https://note.nkmk.me/python-scipy-connected-components/
# from scipy.sparse import csr_matrix
# import string
import sys

sys.setrecursionlimit(10 ** 5 + 10)


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


def resolve():
    def main():
        N, M = map(int, input().split())
        S = str(input())
        T = str(input())

        lcm = N * M // fractions.gcd(N, M)
        NN = lcm // N
        MM = lcm // M

        lcm2 = NN * MM // fractions.gcd(NN, MM)
        i = 0
        ans = lcm
        while True:
            if lcm2 * i // NN < N and lcm2 * i // MM < M:
                if S[lcm2 * i // NN] != T[lcm2 * i // MM]:
                    ans = -1
                i += 1
            else:
                return ans

    print(main())


resolve()
R = input()
h = 2*R*3.14

print(h)

### FIXED CODE ###

R = int(input())
h = 2*R*3.14

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

out = 0

for i in range(n):
    w = i-a[i]
    for j in range(i):
        if(w == a[j] + j):
            out += 1
print(out)


### FIXED CODE ###

instr = input()

if instr == 'ABC':
    print('ARC')
else:
    print('ABC')
a = list(input())
b = list(input())
c = list(input())
moji = a[0]
select = "a"
lengtha = len(a)
lengthb = len(b)
lengthc = len(c)
while True:
  if select == "a":
    select = a[0]
    del a[0]
    lengtha -= 1
    if lengtha == 0:
      print("A")
  elif select == "b":
    select = b[0]
    del b[0]
    lengthb -= 1
    if lengthb == 0:
      print("B")
      break;
  else:
    select = c[0]
    del c[0]
    lengthc -= 1
    if lengthc==0:
      print("C")
      break;

### FIXED CODE ###

a = list(input())
b = list(input())
c = list(input())
moji = a[0]
select = "a"
lengtha = len(a)
lengthb = len(b)
lengthc = len(c)
while True:
  if select == "a":
    if lengtha == 0:
      print("A")
      break;
    else:
      select = a[0]
      del a[0]
      lengtha -= 1
  elif select == "b":
    if lengthb == 0:
      print("B")
      break;
    else:
      select = b[0]
      del b[0]
      lengthb -= 1
  else:
    if lengthc==0:
      print("C")
      break;
    else:
      select = c[0]
      del c[0]
      lengthc -= 1
s = input()
wordList = ['dream', 'dreamer', 'erase', 'eraser']
ansCount = 0
def ansFunc(s1):
    for w in wordList:
        if s1.startswith(w):
            s1 = s1.replace(w, "")
            print(s1)
            if s1 == '':
                print("seikou")
                ansCount += 1
            else:
                ansFunc(s1)
ansFlg = ansFunc(s)
if ansFlg != 0:
    print("YES")
else:
    print("NO")

### FIXED CODE ###

s=input().replace("eraser","").replace("erase","").replace("dreamer","").replace("dream","")
if s:
    print("NO")
else:
    print("YES")
X,Y = input.split()
if X > Y :
  print(">")
elif X < Y:
  print("<")
else:
  print("=")
  

### FIXED CODE ###

X,Y = input().split()
if X > Y :
  print(">")
elif X < Y:
  print("<")
else:
  print("=")
A = list(map(int, input().split()))

B = A.sort(reverse=True)

print(B[0] - B[2])

### FIXED CODE ###

K = int(input())

even = (K//2)
odd = K-(even)

print(odd*even)
while True:
    #a,b=map(int,raw_input().split("."))                                                
    a=input()
    if a<0:break
    s,s2="",""

#    while a!=0:                                                                        
#       s+=str(a%2)                                                                     
#        a/=2                                                                           
    cnt=0

    while b!=0 and cnt<=4:
        b*=2
	s2+=str(b/10)
        b%=10
        cnt+=1
    s2="0"*4

    if len(s2)<=4:
        print "%08d"%(int(format(int(a),"b")))
    else:
        print "NA"

### FIXED CODE ###

def convert(x,p):
    if p==12:
	return
    convert(x/2,p+1)
    if p==3:
        ans.append(".")
    ans.append(str(x%2))

while True:
    n=input()
    if n<0:break
    ans=[]
    shift=int(n*16)
    if n==shift/16.0 and shift<4096:
        convert(shift,0)
	print "".join(ans)
    else:
        print "NA"
import sys
import collections


def main():
    [n, q] = [int(s) for s in sys.stdin.readline().strip().split()]
    a = [-1] * (n-1)
    b = [-1] * (n-1)
    tree = collections.defaultdict(set)
    for i in range(n-1):
        a[i], b[i] = [int(s) for s in sys.stdin.readline().strip().split()]
        tree[a[i]-1].add(b[i]-1)

    p = [-1] * q
    x = [-1] * q
    adds = [0] * n
    for i in range(q):
        p[i], x[i] = [int(s) for s in sys.stdin.readline().strip().split()]
        adds[p[i]-1] += x[i]

    results = [0] * n
    seen = set()

    def rec_add(node, cur):
        cur += adds[node]
        results[node] = cur
        seen.add(node)
        for child in tree[node]:
            if child in seen:
                continue
            rec_add(child, cur)

    rec_add(0, 0)
    print(' '.join([str(n) for n in results]))


main()


### FIXED CODE ###

import sys
import collections


def main():
    [n, q] = [int(s) for s in sys.stdin.readline().strip().split()]
    a = [-1] * (n-1)
    b = [-1] * (n-1)
    tree = collections.defaultdict(set)
    for i in range(n-1):
        a[i], b[i] = [int(s) for s in sys.stdin.readline().strip().split()]
        tree[a[i]-1].add(b[i]-1)
        tree[b[i]-1].add(a[i]-1)

    p = [-1] * q
    x = [-1] * q
    adds = [0] * n
    for i in range(q):
        p[i], x[i] = [int(s) for s in sys.stdin.readline().strip().split()]
        adds[p[i]-1] += x[i]

    results = [0] * n
    seen = set()

    # def rec_add(node, cur, c):
    #     if c > 1000:
    #         return
    #     cur += adds[node]
    #     results[node] = cur
    #     seen.add(node)
    #     for child in tree[node]:
    #         if child in seen:
    #             continue
    #         rec_add(child, cur, c+1)
    #
    # rec_add(0, 0, 0)

    for i in range(n):
        results[i] = adds[i]
        for child in tree[i]:
            adds[child] += results[i]
    print(' '.join([str(n) for n in results]))


main()
N=int(input())
if N==1:
  print ('Hello World')
else:
  A=int(input())
  B=int(input())
  pirnt (A+B)

### FIXED CODE ###

N=int(input())
if N==1:
  print ('Hello World')
else:
  A=int(input())
  B=int(input())
  print (A+B)
a,b,c=map(int,input().split())
list1=[a,b,c]
list2=sorted(list1)
if list2[0]==list2[1]==5 and list2[2]==7:
    print("YES")
else:
    print(NO")

### FIXED CODE ###

a,b,c=map(int,input().split())
list1=[a,b,c]
list2=sorted(list1)
if list2[0]==list2[1]==5 and list2[2]==7:
    print("YES")
else:
    print("NO")
n = input().split()

a = int(n[0])
b = int(n[1])
c = int(n[2])
d = int(n[3])
s = [j for j in range(a, b+1)]
y = 0

for i in range(c, d+1):
  if i in s:
    y += 1
  
if y != 0:
  print("Yes")
else:
  print("No")

### FIXED CODE ###

n = int(input())

print("ACL"*n)
def lowerBound(nums, target):
    if nums[-1] < target: return -1
    lp = 0
    rp = len(nums) - 1
    mp = lp + rp >> 1
    while lp <= rp:
        mp = lp + rp >> 1
        if nums[mp] == target:
            return mp
        if nums[mp] < target:
            lp = mp + 1
        else:
            rp = mp - 1
    return mp if target < nums[mp] else -1

if __name__ == '__main__':
    N = int(input())
    L = [int(l) for l in input().split()]
    L.sort()
    ret = 0
    for idx in range(len(L) - 1, 1, -1):
        for jdx in range(idx - 1, 0, -1):
            c = L[idx] - L[jdx] + 1
            ldx = lowerBound(L[:jdx], c)
            if ldx == -1: continue
            ret += jdx - ldx
    print(ret)


### FIXED CODE ###

if __name__ == '__main__':
    A, B = map(int, input().split())
    if A <= 2 * B:
        print(0)
    else:
        print(A - 2 * B)
import numpy as np
i8 = np.int64
i4 = np.int32


def solve(i, prev, prevc, t, d, ans):
    num = len(t[i])
    x = 1
    if prevc == 1:
        x = 2
    for c in t[i]:
        if c == prev:
            continue
        ans[d[i, c]] = x
        num = max(num, solve(c, i, x, t, d, ans))
        x += 1
        if x == prevc:
            x += 1
    return num


def main():
    stdin = open('/dev/stdin')
    N = int(stdin.readline())
    d = np.empty((N, N), i8)
    d.fill(-1)
    t = [[] for _ in range(N)]
    count = 0
    ans = np.zeros(N - 1, i8)
    for _ in range(N - 1):
        a, b = map(int, stdin.readline().split())
        t[a - 1].append(b - 1)
        t[b - 1].append(a - 1)
        d[a - 1, b - 1] = count
        d[b - 1, a - 1] = count
        count += 1
    num = solve(0, -1, -1, t, d, ans)
    print(num)
    for c in ans:
        print(c)

main()

### FIXED CODE ###

import numpy as np
import sys
sys.setrecursionlimit(100000)
i8 = np.int64
i4 = np.int32


def solve(i, prev, prevc, t, d, ans):
    num = len(t[i])
    x = 1
    if prevc == 1:
        x = 2
    for c in t[i]:
        if c == prev:
            continue
        ans[d[(i, c)]] = x
        num = max(num, solve(c, i, x, t, d, ans))
        x += 1
        if x == prevc:
            x += 1
    return num


def main():
    stdin = open('/dev/stdin')
    N = int(stdin.readline())
    d = {}
    t = [[] for _ in range(N)]
    count = 0
    ans = np.zeros(N - 1, i8)
    for _ in range(N - 1):
        a, b = map(int, stdin.readline().split())
        t[a - 1].append(b - 1)
        t[b - 1].append(a - 1)
        d[(a - 1, b - 1)] = count
        d[(b - 1, a - 1)] = count
        count += 1
    num = solve(0, -1, -1, t, d, ans)
    print(num)
    for c in ans:
        print(c)

main()
# AtCoder Regular Contest 080
# C - 4-adjacent

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

oddcount=0
mod40=0
other=0

for a in alist:
    if a%2==1:
        oddcount+=1
    elif a%4==0:
        mod40+=1
    else:
        other+=1

if N==1:
    if mod40==N:
        print("Yes")
    else:
        print("No")
if N==2 or N==3:
    if mod40>0 or other==N:
        print("Yes")
    else:
        print("No")
# ↑ここまではあってそう。

if N%2==1:
    if N-((other//2)*2)//2 <= mod40:
        print("Yes")
    else:
        print("No")

else:
    print(np.array)

### FIXED CODE ###

# AtCoder Regular Contest 080
# C - 4-adjacent

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

oddcount=0
mod40=0
other=0

for a in alist:
    if a%2==1:
        oddcount+=1
    elif a%4==0:
        mod40+=1
    else:
        other+=1

if N==1:
    if mod40==N:
        print("Yes")
        exit()
    else:
        print("No")
        exit()
if N==2 or N==3:
    if mod40>0 or other==N:
        print("Yes")
        exit()
    else:
        print("No")
        exit()
# ↑ここまではあってそう。

if N%2==1:  # N>3 ,Nが奇数の時
    if (N-((other//2)*2))//2 <= mod40:
        print("Yes")
        exit()
    else:
        print("No")
        exit()

else:   # N>3 ,Nが偶数の時
    if other%2==1:  #かつ、要素が偶数である数が奇数の時  
        if (N-((other//2)*2))//2 <= mod40:
            print("Yes")
            exit()
        else:
            print("No")
            exit()
    else:
        if (N-((other//2)*2))//2 <= mod40:
            print("Yes")
            exit()
        else:
            print("No")
            exit()
n = int(input())
s = [input() for _ in range(n)]

import collections
c0 = collections.Counter(s)
c1 = c0.most_common()
max = c1[0][1]
l = []
for x, i in c0.items():
    if i == max:
        l.append(x)
ans = sorted(l)
for i in ans:
    print(i)

### FIXED CODE ###

a, b, c = list(map(int, input().split()))
if a==b and b!=c:
    print('Yes')
elif a==c and a!=b:
    print('Yes')
elif c==b and b!=a:
    print('Yes')
else:
    print('No')
N, Q = [int(i) for i in input().split()]
S = input()
tdList = reversed([input().split() for _ in range(Q)])

l, r = 0, len(S) - 1
for td in tdList:
    if td[0] == S[l] and td[1] == "L":
        l += 1
    elif td[0] == S[r] and td[1] == "R":
        r -= 1

print(r - l + 1)


### FIXED CODE ###

N, Q = [int(i) for i in input().split()]
S = input()
tdList = reversed([input().split() for _ in range(Q)])

l, r = 0, N - 1
lList, rList = [], []
for td in tdList:
    if td[0] == S[l] and td[1] == "L":
        l += 1
    elif td[0] == S[r] and td[1] == "R":
        r -= 1
    if l != 0 and S[l - 1] == td[0] and td[1] == "R":
        l -= 1
    if r != N - 1 and S[r + 1] == td[0] and td[1] == "L":
        r += 1
    if l > N - 1 or r < 0:
        break

ans = 0
if r >= l:
    ans = r - l + 1

print(ans)
D,G=map(int,input().split())
A=[]
for i in range(D):
    p,c=map(int,input().split())
    A.append([p,c])
a=10**9
for j in range(1,2**D):
    b=format(j, 'b')
    B="0"*(D-len(b))+str(b)
    S=[]
    N=[]
    for k in range(D):
        S.append((A[k][0]*(k+1)*100+A[k][1])*int(B[-k-1]))
        N.append(A[k][0]*int(B[-k-1]))
        if sum(S)>=G:
            s=sum(N)
            if a>s:
                a=s
        else:
            for l in range(D):
                if B[l]=="0" and (G-sum(S))<=((D-l)*100)*(A[-l-1][0]-1) :
                    s=sum(N)+((G-sum(S))//((D-l)*100))+min(1,((G-sum(S))%((D-l)*100)))
                    break
            if a>s:
                a=s
print(a)

### FIXED CODE ###

D,G=map(int,input().split())
A=[]
for i in range(D):
    p,c=map(int,input().split())
    A.append([p,c])
a=10**9
for j in range(2**D):
    b=format(j, 'b')
    B="0"*(D-len(b))+str(b)
    S=[]
    N=[]
    for k in range(D):
        S.append((A[k][0]*(k+1)*100+A[k][1])*int(B[-k-1]))
        N.append(A[k][0]*int(B[-k-1]))
        if sum(S)>=G:
            s=sum(N)
            if a>s:
                a=s
        else:
            for l in range(D):
                if B[l]=="0" and (G-sum(S))<=((D-l)*100)*(A[-l-1][0]-1):
                    s=sum(N)+((G-sum(S))//((D-l)*100))+min(1,((G-sum(S))%((D-l)*100)))
                    if a>s:
                        a=s
                    break
print(a)
s = input()
K = int(input())
s_list = []
for i in range(len(s)):
	for j in range(i + 1, i + K + 1):
		s_list.append(s[i:j])
s_set = set(s_list)
ans = list(s_set.sort())
print(ans[K - 1])

### FIXED CODE ###

s = input()
K = int(input())
substr = set()
for i in range(len(s)):
    for j in range(i+1, i+K+1):
        substr.add(s[i:j])
print(sorted(substr)[K-1])