Harryxun/stf_run huggingface dataset:
import numpy as np
n,m=map(int,input().split())
a=sorted(list(map(int,input().split())))
l=[list(map(int,input().split())) for i in range(m)]
l.sort(key=lambda x: x[1], reverse=True)
l=np.array(l)


nl=[]
k=0
i=0
while k<=n and i<m:
  nl.extend([l[i][1]]*l[i][0])
  k+=l[i][0]
  i+=1


for i in range(min(n,np.sum(l, axis=0)[0])):
  if nl[i]<=a[i]:
    print(sum(nl[0:i])+sum(a[i:n]))
    exit()
if n<np.sum(l, axis=0)[0]:
  print(sum(nl[0:n]))
else:
  print(sum(nl)+sum(a[np.sum(l, axis=0)[0]:n]))

### FIXED CODE ###

import numpy as np
n,m=map(int,input().split())
a=sorted(list(map(int,input().split())))
l=[list(map(int,input().split())) for i in range(m)]
l.sort(key=lambda x: x[1], reverse=True)
l=np.array(l)


nl=[]
k=0
i=0
while k<=n and i<m:
  nl.extend([l[i][1]]*l[i][0])
  k+=l[i][0]
  i+=1


for i in range(min(n,np.sum(l, axis=0)[0])):
  if nl[i]<=a[i]:
    print(sum(nl[0:i])+sum(a[i:n]))
    exit()
if n<np.sum(l, axis=0)[0]:
  print(sum(nl[0:n]))
else:
  print(sum(nl)+sum(a[np.sum(l, axis=0)[0]:n]))
A, B, K = map(int, input().split())
If K%2!=0:
    if A%2!=0;
        A-=1
    B+=A//2
else:
    if B%2!=0;
        B-=1
    A+=B//2
print(A, B)

### FIXED CODE ###

# coding: utf-8
A, B, K = map(int, input().split())
for i in range(K):
    if i%2 ==0 :
        if A%2 != 0:
            A-=1
        B+=A//2
        A=A//2
    else:
        if B%2 !=0:
            B-=1
        A+=B//2
        B=B//2
print(A, B)
N = int(input())
a =list(map(int, input().split()))

ret = 0
for i in range(len(a)-1):
    if a[i] < 0:
        a[i] *= -1
        a[i+1] *= -1
    ret += a[i]
    print(a[i], ret)
ret += a[-1]

abs_list = list(map(abs, a))
test = sorted(enumerate(abs_list), key=lambda x:x[1])
print(max(solve(a), solve(a[::-1]), solve(a[::-1], test[0][0]), solve(a[::-1], test[1][0])))

### FIXED CODE ###

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

cnt = 0
min_val = abs(a[0])
for it in a:
    if abs(it) < min_val:
        min_val = abs(it)
    
    if it < 0:
        cnt+=1
        
abs_list = list(map(abs, a))
if cnt%2 == 0:
    print(sum(abs_list))
else:
    print(sum(abs_list) - 2*min_val)
from collections import deque

N, M = map(int, input().split())

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

ans = [-1] * N
queue = deque()


def bfs():
    queue.append(0)
    while queue:
        now = queue.popleft()

        for c in nei_L[now]:
            if ans[c] == -1:
                ans[c] = now
                queue.append(c)


bfs()

if -1 in ans[1:]:
    print("No")
else:
    print("Yes")
    for i in range(1, N):
        print(ans[i] + 1)

### FIXED CODE ###

from collections import deque

N, M = map(int, input().split())

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

ans = [-1] * N
queue = deque()


def bfs():
    queue.append(0)
    while queue:
        now = queue.popleft()

        for c in nei_L[now]:
            if ans[c] == -1:
                ans[c] = now
                queue.append(c)


bfs()

if -1 in ans[1:]:
    print("No")
else:
    print("Yes")
    for i in range(1, N):
        print(ans[i] + 1)
A,B,K = map(int, input().split())
while K >=1:
    if A >= 1:
        A = A - 1
    elif B >= 1:
        B = B - 1
    K = K -1
print(A, B)

### FIXED CODE ###

s, t = input().split()
print(t+s)
a,b = map(int,input().split())
t = b - a
n = [1]
x = 1

for i in range(2,999):
  x = i + x
  n.append(x)

else:
  for j in range(0,len(n)):
    if n[j+1] - n[j] == t:
      break
print(n[j] - a)
    

### FIXED CODE ###

x = int(input())

if x < 1000:
  print("ABC")
else:
  print("ABD")
N, M = map(int, input().split())
G = [[] for i in range(N + 1)]
for i in range(M):
    l, r, d = map(int, input().split())
    l, r = l - 1, r - 1
    G[l].append((r, d))
    G[r].append((l, -d))
used = [False] * (N + 1)
dist = [0] * (N + 1)
flag = False


def dfs(v, d0):
    global flag
    if used[v]:
        if dist[v] != d0:
            flag = True
        return
    else:
        used[v] = True
        dist[v] = d0

    if v not in G:
        for w, d1 in G[v]:
            dfs(w, d0 + d1)


for i in range(1, N + 1):
    if not used[i]:
        dfs(i, 0)

if flag:
    print("No")
else:
    print("Yes")

### FIXED CODE ###

import sys
sys.setrecursionlimit(200002)
N, M = map(int, input().split())
G = [[] for i in range(N)]
for i in range(M):
    l, r, q = map(int, input().split())
    G[l - 1].append((r - 1, q))
    G[r - 1].append((l - 1, -q))
X = [None] * N


def dfs(u):
    global X, G
    for w, d in G[u]:
        if X[w] is None:
            X[w] = X[u] + d
            if not dfs(w):
                return False
        else:
            if X[w] != X[u] + d:
                return False

    return True


flag = True
for i in range(N):
    if X[i] is None:
        X[i] = 0
        flag &= dfs(i)

if flag:
    print("Yes")
else:
    print("No")
N = int(input())
h = list(map(int, input().split()))
dp = [0 for i in range(10)]
def aFrog(N,h):
    dp[0] = 0
    dp[1] = abs(h[1]-h[0])
    for i in range(2,N):
        dp[i] = min(dp[i-1]+abs(h[i]-h[i-1]), dp[i-2]+abs(h[i]-h[i-2]))
    return dp[N-1]

print(aFrog(N,h))

### FIXED CODE ###

N = int(input())
h = list(map(int, input().split()))
    
inf = 10**9
dp = [0] + [inf]*N
    
for i in range(1,N):
    if i == 1:
        dp[1] = abs(h[1]-h[0])
    else:
        dp[i] = min(dp[i-1]+abs(h[i]-h[i-1]), dp[i-2]+abs(h[i]-h[i-2]))
    
print(dp[N-1])
N, M = map( int, input().split())
A = list( map( int, input().split()))
C = [0,2,5,5,4,5,6,3,7,6]
dp = [(0,0)]*(N+1)
for a in A:
    dp[C[a]] = (1,0)
Z = list( set( C[a] for a in A))
Z.sort()


### FIXED CODE ###

N, M = map( int, input().split())
A = list( map( int, input().split()))
Needs = [0,2,5,5,4,5,6,3,7,6]
A.sort(reverse = True)
V = [0]*10
Check = []
for a in A:
    if V[Needs[a]] == 0:
        Check.append(Needs[a])
        V[Needs[a]] = a
Check.sort()
dp = [-100000]*(N+1)
dp[0] = 0

for x in Check:
    if x <= N:
        dp[x] = 1
for i in range(1,N):
    t = dp[i]
    for x in Check:
        if x + i <= N:
            if dp[x+i] < t + 1:
                dp[x+i] = t+1
ans = ""
t = N
W = [0]*10
while t > 0:
    for a in A:
        x = Needs[a]
        if t-x>=0:
            if dp[t-x]+1 == dp[t]:
                W[V[x]] += 1
                t -= x
                break
for i in range(9,0,-1):
    ans += str(i)*W[i]
print(ans)
n=int(input())
arr=list(map(int, input().split()))
done=False
if 0 in arr:
  print("0")
else:
  mul=1
  for i in range(len(arr)):
    if mul*arr[i]<=int(1e18):
      mul*=arr[i]
    else:
      print("-1")
      done=True
      break
if not done:
  print(mul)

### FIXED CODE ###

n=int(input())
arr=list(map(int, input().split()))
if 0 in arr:
  print("0")
else:
  done=False
  mul=1
  for i in range(len(arr)):
    if mul*arr[i]<=int(1e18):
      mul*=arr[i]
    else:
      print("-1")
      done=True
      break
  if not done:
    print(mul)
a, b, c = map(int, input().split())
ans = a+b+c
print(ans)

### FIXED CODE ###

data = input()
ans = int(data[0])+int(data[1])+int(data[2])
print(ans)
import math
def lcm(x, y):
    return (x * y) // math.gcd(x, y)
A,B=map(int,input().split())
print(lcm(A,B))

### FIXED CODE ###

def gcd(a,b):
    while b!=0:
        a,b = b,a%b
    return a

def lcm(a,b):
    return(int((a*b / gcd(a,b))))
    
A,B=map(int,input().split())
print(lcm(A,B))
# program to print the new string after performing append operation in the string s "..." 
# if only the character s is more than k but if the character s is at most k
# the output will not change
#first we will define the new string

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

str = s
dots = "..."
if len(s) == k:
print(s)
elif len(s) > k:
print (str[0:k],"...")



### FIXED CODE ###

# Take the input K
# Take the inpus S

#Compare the length of S with K and put in in length
#If length<=K... print all
#If length>K... print some of the character

K = int(input()) # 0(1)
S = input() #0(1)
second_answer = [] #0(1)
x = 0 #0(1)

length = len(S) #0(1)

if length <= K : 
    print(S) #0(1)
else:
    while x<K : #0(K)
        print(S[x], end= (""))
        x += 1
    print("...")
s = int(input())
if s == 'ABC':
  print('ARC')
else:
  print('ABC')

### FIXED CODE ###

s = input()
if s == 'ABC':
  print('ARC')
else:
  print('ABC')
import math
import functools
n=int(input())
a=list(map(int,input().split()))
A=functools.reduce(math.gcd,a)
for i in range(n):
    c=a[i]
    del a[i]
    B=functools.reduce(math.gcd,a)
    if A<B:
        A=B
    else:
        A=A
    a.insert(i,c)
print(A)


### FIXED CODE ###

import fractions 
n=int(input())
a=list(map(int,input().split()))
ans=a[0]
sna=a[n-1]
Ans=[ans]*n
Sna=[sna]*n
for j in range(1,n):
  ans=fractions.gcd(ans,a[j])
  Ans[j]=ans
  sna=fractions.gcd(sna,a[n-j-1])
  Sna[j]=sna
m=Sna[n-2]
for k in range(n-2):
  m=max(m,fractions.gcd(Ans[k],Sna[n-3-k]))
m=max(m,Ans[n-2])
print(m)
a,b = map(int,input().split())
go = [0 for i in range(20)]
ad = [0 for i in range(101)]
bd = [0 for i in range(101)]
o = 10
for i in range(100):
  for k in range(o,1001):    
    if(k//12.5 == i+1):      
      ad[i+1] = k
      o = k
      break

o = 10
for i in range(101):
  for k in range(o,1001):    
    if(k//10 == i+1):      
      bd[i+1] = k
      o = k
      break

cnt = 0
for i in range(ad[a],ad[a+1]):
  cnt += 1
  go[cnt] = i
for i in go:
  for k in range(bd[b],bd[b+1]):
    if(i == k):
      print(i)
      exit()
    elif(i == 0):
      print(-1)
      exit()
print(-1)

### FIXED CODE ###

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

for i in range(1,1024):
  if i//12.5 == a and i//10 == b:
    print(i)
    exit()
print(-1)
X, t = map(int, input(),split())
print(max(X - t, 0))

### FIXED CODE ###

X, t = map(int, input().split())
print(max(X - t, 0))
H, W = map(int, input().split())
Ch, Cw = map(int, input().split())
Dh, Dw = map(int, input().split())
S = [None]*(H+4)
S[0] = S[1] = S[H+2] = S[H+3] = ["#"]*(W+4)
for i in range(2, H+2):
    S[i] = ["#"] + ["#"] + list(input()) + ["#"] + ["#"]

Ch += 1
Cw += 1
Dh += 1
Dw += 1

del_h = Dh - Ch
del_w = Dw - Cw

ans = int(10e9)
# print("\n".join(map(str, S)))

def warp(i, j, nxt):
    for h in range(i-2, i+3):
        for w in range(j-2, j+3):
            # print(h, w, i, j)
            # print(S[h][w])
            if S[h][w] == ".":
                nxt.append([h, w, 1])
    
    return 

def dfs(i, j, S, cnt):
    if i == Dh and j == Dw:
        global ans
        ans = min(ans, cnt)
        return 

    S[i][j] = "#"
    nxt = list()
    if S[i][j-1] == ".":
        nxt.append([i, j-1, 0])
    if S[i][j+1] == ".":
        nxt.append([i, j+1, 0])
    if S[i-1][j+1] == ".":
        nxt.append([i-1, j, 0])
    if S[i+1][j] == ".":
        nxt.append([i+1, j, 0])
    warp(i, j, nxt)
    
    for point in nxt:
        cnt += point[2]
        dfs(point[0], point[1], S, cnt)
    
    # S[i][j] = "."

dfs(Ch, Cw, S, 0)
if ans == int(10e9):
    print(-1)
else:
    print(ans)

### FIXED CODE ###

from collections import deque

H, W = map(int, input().split())
Ch, Cw = map(int, input().split())
Dh, Dw = map(int, input().split())
S = [None]*(H+4)
S[0] = S[1] = S[H+2] = S[H+3] = ["#"]*(W+4)
for i in range(2, H+2):
    S[i] = ["#"] + ["#"] + list(input()) + ["#"] + ["#"]

cost = [[-1 for _ in range(W+3)] for _ in range(H+3)]

Ch += 1
Cw += 1
Dh += 1
Dw += 1

# bfs

warp_times = 0

def warp(i, j, cost, warp_times, q):
    change = 0
    for h in range(i-2, i+3):
        for w in range(j-2, j+3):
            # print(h, w, i, j)
            # print(S[h][w])
            if S[h][w] == "." and cost[h][w] == -1:
                q.append([h, w])
                cost[h][w] = warp_times + 1
                change = 1
    
    return change

q = deque()
q.append([Ch, Cw])

while True:
    

    same_cost = list()
    no_change = 1

    while len(q):
        # print(q)
        now = q.popleft()
        i = now[0]
        j = now[1]

        cost[i][j] = warp_times
        same_cost.append([i, j])

        if S[i][j-1] == "." and cost[i][j-1] == -1:
            q.append([i, j-1])
            cost[i][j-1] = warp_times
        if S[i][j+1] == "." and cost[i][j+1] == -1:
            q.append([i, j+1])
            cost[i][j+1] = warp_times
        if S[i-1][j] == "." and cost[i-1][j] == -1:
            q.append([i-1, j])
            cost[i-1][j] = warp_times
        if S[i+1][j] == "." and cost[i+1][j] == -1:
            q.append([i+1, j])
            cost[i-1][j] = warp_times
    

    for point in same_cost:
        change = warp(point[0], point[1], cost, warp_times, q)
        if change :
            no_change = 0
    
    warp_times += 1
    
    if no_change:
        break

print(cost[Dh][Dw])
s = input()
N = int(input())
l = len(s)
li=list(set(s))
li.sort()
result=[]
print(li)
if len(li)>5:
    a=5
else:
    a=l-1
for i in range(a):
    index=s.index(li[i])
    for scope in range(1,l+1):
        if not s[index:index+scope] in result:
            result.append(s[index:index+scope])
result.sort()
print(result)
print(result[N-1])

### FIXED CODE ###

str=input()
K=int(input())
s=set()
for scope in range(1,K+1):
    for f in range(len(str)-scope+1):
        s.add(str[f:f+scope])
print(sorted([x for x in s])[K-1])
ls = list(map(int, input().split()))
A = ls[0]
B = ls[1]
C = ls[2]
D = ls[3]

k = [ i for i in range(0,101) if A <= i <= B and C <= i <= D]
print(max(k) - min(k))


### FIXED CODE ###

ls = list(map(int, input().split()))
A = ls[0]
B = ls[1]
C = ls[2]
D = ls[3]

k = [ i for i in range(0,101) if A <= i <= B and C <= i <= D]
if not k:
    print(0)
else:
    print(max(k) - min(k))
n=int(input())
s=[]
for i in range(0,n):
    s.append(int(input()))
max=0
pos=0
for i in range(n):
    c=0
    for j in range(i,n-1):
        if(s[j]>s[j+1]):
            c+=1
        else:
            break
    if(c>max):
        max=c
        pos=i+1
    if(max>(n-i-1)):
        break
print(pos)


### FIXED CODE ###

n = int(input())

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

x = 0
y = 0

for i in range(1, n):
    if(a[i] <= a[i-1]):
        y +=1
    else:
        x = max(x,y)
        y = 0

print(max(x,y))
# coding: utf-8
#Problem Name: Circumscrived Circle of a Triangle
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

n = int(raw_input())
data = [0 for _ in range(n)]
for i in range(n):
    data[i] = map(float,raw_input().split(' '))
for (x1,y1,x2,y2,x3,y3) in data:
    det = 4*x2*y3 - 4*y2*x3
    px = ((x2**2 + y2**2)*2*y3 - (x3**2 + y3**2)*2*y2)/det
    py = (2*x2*(x3**2 + y3**2) - 2*x3*(x2**2 + y2**2))/det
    r = ((px-x1)**2 + (py-y1)**2)**.5
    print '{0:.3f} {1:.3f} {2:.3f}'.format(px,py,r)

### FIXED CODE ###

# coding: utf-8
#Problem Name: Circumscrived Circle of a Triangle
#ID: tabris
#Mail: t123037@kaiyodai.ac.jp

def __det(matrix):
    return matrix[0][0] * matrix[1][1] - matrix[0][1] * matrix[1][0]

def __sqdist(p1,p2):
    return ((p1[0] - p2[0])**2 + (p1[1] - p2[1])**2)**.5

n = int(raw_input())
for i in range(n):
    x1,y1,x2,y2,x3,y3 = map(float,raw_input().split(' '))
    det = __det([[(x2-x1),(y2-y1)],[(x3-x1),(y3-y1)]])
    c1 = (x2**2-x1**2+y2**2-y1**2)/2
    c2 = (x3**2-x1**2+y3**2-y1**2)/2
    px = __det([[c1,(y2-y1)],[c2,(y3-y1)]])/det
    py = __det([[(x2-x1),c1],[(x3-x1),c2]])/det
    r = __sqdist([x1,y1],[px,py])
    print '{0:.3f} {1:.3f} {2:.3f}'.format(px,py,r)
import sys
input = sys.stdin.readline
n,m,p=map(int,input().split())
edge = [[] for i in range(m)]
for i in range(m):
  a,b,c=map(int,input().split())
  edge[i]=[a-1,b-1,-c+p]
d=[float("inf")]*n
d[0]=0
for i in range(n):
  e0,e1,e2=edge[i]
  if d[e0]!=float("inf") and d[e1]>d[e0]+e2:
      d[e1]=d[e0]+e2
ans1=d[-1]
for i in range(n):
  e0,e1,e2=edge[i]
  if d[e0]!=float("inf") and d[e1]>d[e0]+e2:
    d[e1]=d[e0]+e2
ans2=d[-1]
print(-1 if ans1!=ans2 else max(0,-ans2))

### FIXED CODE ###

import sys
input = sys.stdin.readline
n,m,p=map(int,input().split())
edge = [[] for i in range(m)]
for i in range(m):
  a,b,c=map(int,input().split())
  edge[i]=[a-1,b-1,-c+p]
d=[float("inf")]*n
d[0]=0

for _ in range(n):
  for i in range(m):
    e0,e1,e2=edge[i]
    d[e1]=min(d[e1],d[e0]+e2)
ans1=d[-1]
for _ in range(n):
  for i in range(m):
    e0,e1,e2=edge[i]
    if d[e1]>d[e0]+e2:
      d[e1]=-float("inf")
ans2=d[-1]
print(-1 if ans1!=ans2 else max(0,-ans1))
# input
s = input()

ans = s[0] + str(len(s) - 2) + s[len(str) - 1]

print(ans)

### FIXED CODE ###

# input
s = input()

ans = s[0] + str(len(s) - 2) + s[len(s) - 1]

print(ans)
from collections import Counter


def main():
    n = int(input())
    a = []
    for i in range(n):
        a.append(int(input()))
    counter = Counter(a)
    ans: int = 0
    for key, value in counter.items():
        if value % 2 == 1:
            ans += 1
    print(ans)


main()


### FIXED CODE ###

from collections import Counter


def main():
    n = int(input())
    a = []
    for i in range(n):
        a.append(int(input()))
    counter = Counter(a)
    ans = 0
    for key, value in counter.items():
        if value % 2 == 1:
            ans += 1
    print(ans)


main()
N = int(input())
tmp = input()
H = [int(x.strip()) for x in tmp.split(' ')]
n = 0
lists = list()
lists.append(0)
count = 0
while n <= N-2:
    if H[n] >= H[n+1]:
        while H[n] >= H[n+1]:
            count += 1
            n += 1
            if n == N-1:
                lists.append(count)
                break
        lists.append(count)
        count = 0
    else:
        n += 1
print(max(lists))

### FIXED CODE ###

S = input()
S.split()
T = input()
T.split()
count = 0
for i in range(0, 3):
    if S[i] == T[i]:
        count += 1
print(count)
N = int(input())
x = list(map(int, input().split())
cnt = 0
mn_lst = []
for i in x:
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i <<= 1
    mn_lst.append(cnt)
print(min(mn_lst))

### FIXED CODE ###

N = int(input())
x = list(map(int, input().split()))
mn_lst = []
for i in x:
    cnt = 0
    while i % 2 == 0:
        cnt += 1
        i >>= 1
    mn_lst.append(cnt)
    
print(min(mn_lst))
a, b, c = map(int, input().spulit())
if a / c <= b:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

d,t,s=map(int,input().split())
if d<=t*s:
    print("Yes")
else:
    print("No")
N,K = map(int, input().split())
S = input()


if S[K] == "A":
    S[K] = "a"
elif S[K] == "B":
    S[K] = "b"
elif S[K] == "C":
    S[K] = "c"

print("".join(S))

### FIXED CODE ###

n, k = map(int,input().split())
s = list(input())
 
if s[k-1] == "A":
  s[k-1] = "a"
elif s[k-1] == "B":
  s[k-1] = "b"
elif s[k-1] == "C":
  s[k-1] = "c"
 
print("".join(s))
def judgeServe(strs: str) -> str:
  if s.count('A') > 0 and s.count('A') < 3:
    return 'Yes'
  else:
    return 'No'

strs = input()
print(judgeServe(strs))
  
    

### FIXED CODE ###

strs = input()
count_A = strs.count('A')
if count_A > 0 and count_A < 3:
  print('Yes')
else:
  print('No')
#include<iostream>
#include<algorithm>
#include <vector>
using namespace std;

int main(){
    int a,b,c;
    const int CO=100;
    vector<int> vb;

    cin>>a>>b>>c;
    for (int i=1;i<CO+1;i++){
        if (a %i==0 && b % i==0){
        vb.push_back(i);
        }
    }
    reverse(vb.begin(),vb.end());
    cout<<vb[c-1]<<endl;
    return 0;
}

### FIXED CODE ###

a,b,c=map(int,input().split())
lst=[]
for i in range(1,101):
  if a %i==0 and b % i ==0:
    lst.append(i)
print(sorted(lst,reverse=True)[c-1])
n,k=map(int,input().split())
L=[int(i) for i in input().split()]

sumL=[None for i in range(n)]
sumL[0] = L[0]
for i in range(len(L)-1):
    sumL[i+1] = sumL[i] + L[i+1]

res=0

step=0
lenL=len(sumL)

for q in range(lenL):
    step=0
    for nums in sumL:
        step+=1
        if nums>=k:
            #print(len(sumL)-step+1)
            res+=lenL-step+1
            break
    else:
        break
    #print(sumL)
    sumL=sumL[step-1:]
    #print(sumL)
    lenL-=step-1
    k+=L[q]
    
    
    
print(res)


### FIXED CODE ###

L=[i for i in input().split()]
x=L[0]
a=L[1]
if x<a:
    print(0)
else:
    print(10)
S = str(input())
T = str(input())

if S + .  == T:
  print(Yes)
else:
  No


### FIXED CODE ###

S = str(input())
T = str(input())
t = int(len(T)) - 1
U = T[:t]

if S == U:
  print('Yes')
else:
  print('No')
n, m = map(int, input().split())
sc = [list(map(int, input().split())) for i in range(m)]
sc = list(map(list, set(map(tuple, sc))))

l = list()
for i in range(1000):
    i = str(i)
    flg = True
    for j in sc:
        if i[j[0]-1] != j[1]:
            flg = False
    if flg:
        l.append(int(i))

print(min(l))

### FIXED CODE ###

n, m = map(int, input().split())
sc = [list(map(int, input().split())) for i in range(m)]
sc = list(map(list, set(map(tuple, sc))))

ans = [-1] * n
for i in sc:
    if i[0] == 1 and i[1] == 0 and n == 1:
        print(0)
        exit()
    if i[0] == 1 and i[1] == 0:
        print(-1)
        exit()
    if i[0] > n or ans[i[0]-1] != -1:
        print(-1)
        exit()
    ans[i[0]-1] = i[1]

for i, val in enumerate(ans):
    if val == -1:
        ans[i] = 0

if (m == 0 and n != 1) or (ans[0] == 0 and n != 1):
    ans[0] = 1

flg = False
for i in ans:
    if i != 0:
        flg = True
if not flg:
    print(0)
    exit()

ans = map(lambda x: str(x), ans)
print("".join(ans))
while True:
	n = int(input())
	counter = 0
	for a in range(10):
		for b in range(10):
			for c in range(10):
				for d in range(10):
					if a + b + c + d == n:
						counter += 1
	print(counter)

### FIXED CODE ###

import sys
dataset = sys.stdin.readlines()
for n in dataset:
	n = int(n)
	counter = 0
	for a in range(10):
		for b in range(10):
			for c in range(10):
				for d in range(10):
					if a + b + c + d == n:
						counter += 1
	print(counter)
N,K=map(int,input().split())
l=abs(N//K)
p=K*l
for i in range(1,10000):
	if abs(N-(K*(l+i)))<abs(N-p):
		p=p+i
print(abs(N-p))

### FIXED CODE ###

#!/usr/bin/env python3
import sys


def solve(X: int, Y: int, Z: int):
    print(Z,X,Y)
    return


# Generated by 1.1.6 https://github.com/kyuridenamida/atcoder-tools  (tips: You use the default template now. You can remove this line by using your custom template)
def main():
    def iterate_tokens():
        for line in sys.stdin:
            for word in line.split():
                yield word
    tokens = iterate_tokens()
    X = int(next(tokens))  # type: int
    Y = int(next(tokens))  # type: int
    Z = int(next(tokens))  # type: int
    solve(X, Y, Z)

if __name__ == '__main__':
    main()
given = int(input())
ans = 0
for i in range(given):
  current = str(i + 1)
  ans += len(current) & 1
print(ans)

### FIXED CODE ###

a, b, c = [int(x) for x in input().split()]
print(c - min(c, a - b))
a,b=map(int,input().split(''))
m=a*b
if m%2=1;
  print('Odd')
else:
  print('Even')

### FIXED CODE ###

a,b=map(int,input().split())
m=a*b
if m%2==1:
  print('Odd')
else:
  print('Even')
import sys

for i in sys.stdin:
    i = i.split(" ")
    x, y = int(i[0]), int(i[1])
    if x == y == 0:
       break
    elif x <= y:
       print("{0} {1}".format(x, y))
    else:
       pritn("{0} {1}".format(y, x))

### FIXED CODE ###

import sys
 
for i in sys.stdin:
    i = i.split(" ")
    x, y = int(i[0]), int(i[1])
    if x == y == 0:
       break
    elif x <= y:
       print("{0} {1}".format(x, y))
    else:
       print("{0} {1}".format(y, x))
nm = list(map(int, (input().split())))
if nm[1] == 0:
    print(0, 0)

else:    
    ans_dict = {}
    ans_list = [input().split() for i in range(nm[1])]
    for i in range(len(ans_list)):
        key_val = ans_list[i][0]

        try:
            ans_dict[key_val].append(ans_list[i][1])
        except:
            ans_dict[key_val] = [ans_list[i][1]]
    ans_cnt = 0
    wa_cnt = 0
    for key_val in ans_dict.keys():
        check_list = ans_dict[key_val]

        if "AC" in check_list:
            ans_cnt += 1
        else:
            pass
        try:
            wa_cnt += len(check_list[:check_list.index("AC")])
        except:
            pass
print(ans_cnt, wa_cnt)    

### FIXED CODE ###

word = input()
word_list = [chr(ord('a') + i) for i in range(26)]
print(word_list[word_list.index(word) + 1])