Harryxun/stf_run huggingface dataset:
n,m=map(int,input().split())
a = [0]*n
for i in range(m):
  a[int(input())-1] = 1

s=[0]*n
if a[0] == 1:
  s[0] = 0
  s[1] = 1
elif a[1] == 1:
  s[0] = 1
  s[1] = 0
else:
  s[0] = 1
  s[1] = 2
  
for i in range(2,n):
  #壊れている
  if a[i] == 1:
    s[i] = 0
  else:
    s[i] = s[i-1]+s[i-2]
print(s[n-1]%1000000007)


### FIXED CODE ###

n,m=map(int,input().split())
a = [0]*n
if n!=1:
  if m!=0:
    for i in range(m):
      a[int(input())-1] = 1

  s=[0]*n
  if a[0]==1 and a[1] == 1:
    s[0] = 0
    s[1] = 0
  elif a[0] == 1:
    s[0] = 0
    s[1] = 1
  elif a[1] == 1:
    s[0] = 1
    s[1] = 0
  else:
    s[0] = 1
    s[1] = 2

  for i in range(2,n):
    #壊れている
    if a[i] == 1:
      s[i] = 0
    else:
      s[i] = s[i-1]+s[i-2]
  print(s[n-1]%1000000007)
else:
  print(1)
phai = 1
cnt = 0
loop_hantei = {1}

for _ in range(N):
    phai = A[phai-1]
    cnt += 1
    if phai in loop_hantei:
        print('-1')
        break
    else:
        loop_hantei.add(phai)
    if phai == 2:
        print(cnt)
        break

### FIXED CODE ###

N = int(input())
A = []
for _ in range(N):
    A.append(int(input()))

phai = 1
cnt = 0
loop_hantei = {1}

for _ in range(N):
    phai = A[phai-1]
    cnt += 1
    if phai in loop_hantei:
        print('-1')
        break
    else:
        loop_hantei.add(phai)
    if phai == 2:
        print(cnt)
        break
N,M,Q=map(int,input().split())
a=[]
b=[]
c=[]
d=[]
for i in range(Q):
  ta,tb,tc,td=map(int,input().split())
  a+=[ta]
  b+=[tb]
  c+=[tc]
  d+=[td]
maxs=0
A=[0 for i in range(10)]
for i in range(10):
  for j in range(i,10):
    for k in range(j,10):
      for l in range(k,10):
        for m in range(l,10):
          for n in range(m,10):
            for o in range(n,10):
              for p in range(o,10):
                for q in range(p,10):
                  for r in range(q,10):
                    A[0]=i
                    A[1]=j
                    A[2]=k
                    A[3]=l
                    A[4]=m
                    A[5]=n
                    A[6]=o
                    A[7]=p
                    A[8]=q
                    A[9]=r
                    su=0
                    for z in range(Q):
                      if A[b[z]]-A[a[z]]==c[z]:
                        su+=d[z]
                    if su>maxs:
                      maxs=su
print(maxs)


### FIXED CODE ###

N,M,Q=map(int,input().split())
a=[]
b=[]
c=[]
d=[]
for i in range(Q):
  ta,tb,tc,td=map(int,input().split())
  a+=[ta]
  b+=[tb]
  c+=[tc]
  d+=[td]
maxs=0
A=[0 for i in range(10)]
for i in range(M):
  for j in range(i,M):
    for k in range(j,M):
      for l in range(k,M):
        for m in range(l,M):
          for n in range(m,M):
            for o in range(n,M):
              for p in range(o,M):
                for q in range(p,M):
                  for r in range(q,M):
                    A[0]=i
                    A[1]=j
                    A[2]=k
                    A[3]=l
                    A[4]=m
                    A[5]=n
                    A[6]=o
                    A[7]=p
                    A[8]=q
                    A[9]=r
                    su=0
                    for z in range(Q):
                      if A[b[z]-1]-A[a[z]-1]==c[z]:
                        su+=d[z]
                    if su>maxs:
                      maxs=su
print(maxs)
from sys import stdin
readline = stdin.readline

def main():
    R, S, P = 1, 2, 3
    W, L, D = 1, 2, 3

    rps = {
        (R, S, P):{R:D, S:D, P:D},
        (R, S)   :{R:W, S:L},
        (S, P)   :{S:W, P:L},
        (R, P)   :{P:W, R:L}
    }

    while True:
        try:
            hands = [int(readline()) for _ in range(5)]
        except:
            break
        hand_set = tuple(sorted(set(hands)))
        for h in hands:
            print(rps[hand_set][h])
main()

### FIXED CODE ###

from sys import stdin
readline = stdin.readline


R, S, P = 1, 2, 3  # rock, scissors, paper
W, L, D = 1, 2, 3  # win, lose, draw

rps = {
    (R, S, P): {R: D, S: D, P: D},
    (R, S):    {R: W, S: L},
    (S, P):    {S: W, P: L},
    (R, P):    {P: W, R: L},
    (R,):       {R: D},
    (S,):       {S: D},
    (P,):       {P: D}
    }

while True:
    hands = []
    hands.append(int(readline()))
    if hands[0] == 0:
        break
    for _ in range(4):
        hands.append(int(readline()))

    hands_set = tuple(sorted(set(hands)))
    for h in hands:
        print(rps[hands_set][h])
a = int(input("aa= "))
b = int(input("bb= "))

c = a*b

if c%2 == 0:
    print("Even")
else :
    print("Odd")

### FIXED CODE ###

a, b = map(int,input().split())
c = a*b
 
if c%2 == 0:
    print("Even")
else :
    print("Odd")
n=int(input())
a=0
b=0
ab=0
ba=0
for i in range(n):
  s=input()
  ab+=s.count('AB')
  if s[len(s)-1]=='A':
    a+=1
  if s[0]=='B':
    b+=1
  if s[len(s)-1]=='A' and s[0]=='B':
    ba+=1
if ba*2==a+b+1 or ba*2==a+b:
  print(ans+ba-1)
else:
  print(ab+min(a,b))

### FIXED CODE ###

n=int(input())
a=0
b=0
ab=0
ba=0
bet=0
for i in range(n):
  s=input()
  ab+=s.count('AB')
  if s[len(s)-1]=='A' and s[0]!='B':
    a+=1
  if s[0]=='B' and s[-1]!='A':
    b+=1
  if s[-1]=='A' and s[0]=='B':
    ba+=1
if a!=0 and b!=0:
  bet+=ba+1
  bet+=min(a-1,b-1)
elif a==0 and b==0:
  if ba>0:
    bet+=ba-1
else:
  bet+=ba
print(ab+bet)
K = int(input())
 
x = np.arange(1, K + 1)
nums = np.gcd.outer(np.gcd.outer(x, x), x)
print(nums.sum())

### FIXED CODE ###

import sys
read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readlines = sys.stdin.buffer.readlines
import numpy as np
 
K = int(read())
 
x = np.arange(1, K + 1)
nums = np.gcd.outer(np.gcd.outer(x, x), x)
print(nums.sum())
a = map(int, raw_input().split())
print a[0]*a[1]    2*a[0]+2*a[1]

### FIXED CODE ###

a = map(int, raw_input().split())
print a[0]*a[1],2*a[0]+2*a[1]
### Repetitive Processing - Print Test Cases

i = 0
while True:
    x = int(input());
    i += 1
    if x == 0: break
    print("Case {}: {}".format(c, i))


### FIXED CODE ###

### Repetitive Processing - Print Test Cases

i = 0
while True:
    x = int(input());
    i += 1
    if x == 0: break
    print("Case {}: {}".format(i, x))
from collections import Counter

N = int(input())
X = input()

if X == '1':
    print(1)
    exit()
elif X == '0':
    print(0)
    exit()
    
x1 = 0
for i in X:
    if i == '1':
        x1 += 1

for i in range(N):
    if X[i] == '1':
        tmp = - (1<<(N-i-1))
        tmp2 = -1
    else:
        tmp = (1<<(N-i-1))
        tmp2 = 1
    
    n = int(X, 2) + tmp
    n %= x1 + tmp2
    cnt = 1
    while n != 0:
        c = 0
        for j in bin(n):
            c += j=='1'
        n %= c
        cnt += 1
    print(cnt)

### FIXED CODE ###

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


def pop_cnt(n):
    return bin(n).count('1')


def f(n):
    cnt = 0
    while n != 0:
        n = n % pop_cnt(n)
        cnt += 1
    return cnt
 
n = int(readline())
x2 = list(readline().decode().rstrip())
x10 = int(''.join(x2), 2)

c = x2.count('1')
mod1 = x10 % (c + 1)
mod2 = x10 % (c - 1) if c-1 != 0 else 0

for i in range(n):
    ans = 0
    if x2[i] == '0':
        t = (mod1 + pow(2, n-i-1, c+1)) % (c+1)
    else:
        if c-1 != 0:
            t = (mod2 - pow(2, n-i-1, c-1)) % (c-1)
        else:
            print(0)
            continue
    
    ans = f(t) + 1
    print(ans)
N = int(input())
A = list(map(int, input().split()))

syain = []

for i in range(N):
    print(A.count(i+1))

### FIXED CODE ###

import math
R = int(input())
print(2 * R * math.pi)
n,x,y = map(int,input().split())
ans = [0]*(n-1)
for i in range(n-1):
    for j in range(i+1,n):
        dis = min(j-i, abs(j-(x-1))+1+abs((y-1)-i), abs(j-(y-1))+1+abs((x-1)-i))
        ans[dis-1] += 1
for i in range(n-1):
    print(ans[i])

### FIXED CODE ###

s = input()
if s[2]==s[3] and s[4]==s[5]:
    print('Yes')
else:
    print('No')
import sys

def makec(c):
  alph = ['a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm',
          'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z']
  if c[-1] == 'z':
    return makec(c[-1])
  else:
    pos = (alph.index(c[-1]) + 1) % 26
    c = c[:-1] + alph[pos]
    return c


def f(S, K, c):
  if K == 0:
    return c[:-1]
  
  if c in S:
    c = c + 'a'
    return f(S, K-1, c)
  else:
    if c > S:
      c = c[:-1]
    c = makec(c)
    return f(S, K, c)

def main():
  input = sys.stdin.readline
  S = str(input().strip())
  K = int(input())
  ans = f(S, K, 'a')
  print(ans)


if __name__ == '__main__':
  main()

### FIXED CODE ###

import sys


def main():
  input = sys.stdin.readline
  S = str(input().strip())
  K = int(input())
  max = min(5, len(S))
  sub = []
  for i in range(len(S)):
    for j in range(1, max+1):
      if i+j > len(S):
        continue
      sub.append(S[i:i+j])
  sub = sorted(list(set(sub)))
  print(sub[K-1])


if __name__ == '__main__':
  main()
pair = [[1,2],[2,5],[3,5],[4,4],[5,5],[6,6],[7,3],[8,7],[9,6]]
n,m =[int(x) for x in input().split()]
given = sorted([int(i) for i in input().split()])
given_pair = sorted([pair[x-1] for x in given],key = lambda x :x[1])
def rec(n,t_list,pair_list):
  if n==0:
    return t_list
  elif n< pair_list[0][1]:
    return t_list[:-1]
  else:
    a = rec(n-pair_list[0][1],t_list+[pair_list[0][0]],pair_list)
    if pair_list[1:]!=[]:
        b = rec(n,t_list,pair_list[1:])
        if len(a)>len(b):
                return a
        elif len(a)==len(b):
                if(a[-1]>=b[-1]):
                        return a
                else:
                        return b
        else:
                return b
    else:
        return a

kotae = map(str,sorted(rec(n,[],given_pair),reverse=True))
print("".join(kotae))


### FIXED CODE ###

n, m = [int(i) for i in input().split()]
am = sorted([int(i) for i in input().split()],reverse=True)
c = [2, 5, 5, 4, 5, 6, 3, 7, 6]

dp = [-1 for i in range(n+1)]
dp[0]=0
for i in range(n+1):
    #max_tmp = -float("inf")
    for j in am:
        if i+c[j-1]<=n:
            dp[i+c[j-1]] = max(dp[i+c[j-1]], dp[i]+1)
#print(dp)
tmp_n = n
ans =""
for i in range(dp[n]):
    for j in range(m):
        if i==dp[n]-1 and tmp_n- c[am[j]-1] != 0:
            continue
        if tmp_n - c[am[j]-1] >= 0 and dp[tmp_n - c[am[j]-1]] == dp[tmp_n] -1:
            ans+=(str(am[j]))
            tmp_n -= c[am[j]-1]
            break


print(ans)
from sys import stdin

if __name__ == "__main__":
  l = [int(i) for i in stdin.readline().split(' ')]
  sort(l)
  if l[0]%2 == l[1]%2:
    ex = 2
  else:
    ex = 0
  print((l[-1]*2 - (l[0] + l[1]))/2 + ex)
  

### FIXED CODE ###

from sys import stdin

if __name__ == "__main__":
  l = [int(i) for i in stdin.readline().split(' ')]
  l = sorted(l)
  if l[0]%2 == l[1]%2:
    ex = 0
  else:
    ex = 2
  print((l[-1]*2 - (l[0] + l[1]))//2 + ex)
import numpy as np
import sys

buf = sys.stdin.buffer
R,C = map(int,buf.readline().split())
# +1周分だけ
black = np.zeros((H+2,W+2),dtype=np.bool)
# \nがあることに注意
black[1:-1,1:] = (np.frombuffer(buf.read(H*(W+1)),dtype='S1') == b'#').reshape(H,W+1)

INF = 10 ** 4
dist = np.zeros((H,W),dtype=np.int8)
# .のところは０それ以外はINFで初期化
dist[~black[1:-1,1:-1]] = INF
# 右、左、下、上と展開させていく感じ
for n in range(1,H):
    np.minimum(dist[n-1]+1,dist[n],out=dist[n])
for n in range(H-2,-1,-1):
    np.minimum(dist[n+1]+1,dist[n],out=dist[n])
for n in range(1,W):
    np.minimum(dist[:,n-1]+1,dist[:,n],out=dist[:,n])
for n in range(W-2,-1,-1):
    np.minimum(dist[:,n+1]+1,dist[:,n],out=dist[:,n])

print(dist.max())

### FIXED CODE ###

import numpy as np
import sys
# https://atcoder.jp/contests/agc033/submissions/6021787
buf = sys.stdin.buffer
H,W = map(int,buf.readline().split())
# +1周分だけ
black = np.zeros((H+2,W+2),dtype=np.bool)
# \nがあることに注意
black[1:-1,1:] = (np.frombuffer(buf.read(H*(W+1)),dtype='S1') == b'#').reshape(H,W+1)

INF = 10 ** 4
dist = np.zeros((H,W),dtype=np.int16)
# .のところは０それ以外はINFで初期化
dist[~black[1:-1,1:-1]] = INF
# 右、左、下、上と展開させていく感じ
for n in range(1,H):
    np.minimum(dist[n-1]+1,dist[n],out=dist[n])
for n in range(H-2,-1,-1):
    np.minimum(dist[n+1]+1,dist[n],out=dist[n])
for n in range(1,W):
    np.minimum(dist[:,n-1]+1,dist[:,n],out=dist[:,n])
for n in range(W-2,-1,-1):
    np.minimum(dist[:,n+1]+1,dist[:,n],out=dist[:,n])

print(dist.max())
n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
p=0
for i in range(n):
  p+=b[a[i]-1]
  if　i>=1 and a[i]-a[i-1]==1:
    p+=c[a[i-1]-1]
print(p)
  


### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
b=list(map(int,input().split()))
c=list(map(int,input().split()))
p=0
for i in range(n):
  p+=b[a[i]-1]
  if i>=1 and a[i]-a[i-1]==1:
    p+=c[a[i-1]-1]
print(p)
n,k=(int(x) for x in input.split())
array = list(map(int, input().strip().split()))
print(f'{n} {k}')
print(sum(array[0:k]))

### FIXED CODE ###

n,k=(int(x) for x in input().split())
mylist=list(map(int, input().strip().split()))
mylist.sort()
num=0
suma=0
while num < k:
    suma=suma+mylist[num]
    num += 1
print(suma)
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")

### 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,k = map(int,input().split())
li = list(map(int,input().split()))
mod = 10**9 +7
 
ans_1 = 0
ans_2 = 0
for i in range(n):
  for j in range(i+1,n):
    if li[i] > li[j]:
      ans_1+= 1
for i in range(n):
  for j in range(n):
    if li[i] > li[j]:
      ans_2 += 1
ans = k*ans_1%mod + 0.5*k%mod*(k-1)%mod*ans_2%mod
print(int(ans%mod))

### FIXED CODE ###

m,d = map(int,input().split())
ans = 0
for i in range(1,m+1):
  for j in range(1,d+1):
    if j%10 >= 2 and j//10 >= 2 and (j%10) * (j//10) ==i:
      ans += 1
print(ans)
import math

def nCr(n,r):
    f = math.factorial
    return int(f(n) / f(r) / f(n-r))

def nHk(n, k):
    f = math.factorial
    return int(f(n + k - 1) // f(k) // f(n - 1))

N, K = map(int, input().split())
MOD = 10 ** 9 + 7

for i in range(1, K + 1):
    ans = nCr(K - 1, i - 1) * nCr(N - K + 1, i) % MOD
    print(ans)


### FIXED CODE ###

from operator import mul
from functools import reduce

def nCr(n,r):
    r = min(n-r,r)
    if r == 0: return 1
    over = reduce(mul, range(n, n - r, -1))
    under = reduce(mul, range(1,r + 1))
    return over // under

N, K = map(int, input().split())
MOD = 10 ** 9 + 7

for i in range(1, K + 1):
    if i > N - K + 1:
        ans = 0
    else:
        ans = nCr(K - 1, i - 1) * nCr(N - K + 1, i) % MOD
    print(ans)
import.math
A, B, C, D = map(int, input().split())
sita = A*30+B*0.5-B*6
sitas = 0
if sita > 180:
  sitas = 360 - sita
elif -180<= sita < 0:
  sitas = sita * -1
elif sita < -180:
  sitas = sita + 360
else:
  sitas = sita
sin = math.cos(math.radians(sitas))
tan = C**2+D**2-2*C*D*sin
print(math.sqrt(tan))

### FIXED CODE ###

def resolve():
    import math
    A, B, H, M = map(int, input().split())
    sita = abs(H*30+M*0.5-M*6)
    if sita > 180:
        sita = 360 - sita
    print(math.sqrt(A**2+B**2-2*A*B*math.cos(math.radians(sita))))
resolve()
x,y=(int(x) for x in input().split())
if y>x*4:
    print('No')
elif y<x*2:
    print('No')
elif y%2==1:
    print('No')
else:
    print('Yes')


### FIXED CODE ###

a,b,c,d,e=(int(x) for x in input().split())
if a==0:
    print('1')
elif b==0:
    print('2')
elif c==0:
    print('3')
elif d==0:
    print('4')
elif e==0:
    print('5')
S = str(input())
T = str(input())
slist = list(S)
tlist = list(T)
Slen = len(slist)
Tlen = len(tlist)
ANSlist = []
Flag = 0
if Slen < Tlen:
    Flag = 0
else:
    for i in range(Slen-Tlen+1):
        flag = 0
        for j in range(Tlen):
            if slist[i+j] == "?" or slist[i+j] == tlist[j]:
                pass
            else:
                flag = 1
                break
        if flag == 0:
            Skari = ""
            k = 0
            for k in range(i):
                if slist[k] == "?":
                    Skari+="a"
                else:
                    Skari+=slist[k]
            l = 0
            for l in range(Tlen):
                Skari+=tlist[l]
            m = 0
            Skarilen = len(Skari)
            for m in range(Slen-Skarilen):
                M = m+Slen
                if slist[M] == "?":
                    Skari+="a"
                else:
                    Skari+=slist[M]
            ANSlist.append(Skari)
            Flag+=1
        else:
            pass
if Flag >= 1:
    print(min(ANSlist))
else:
    print("UNRESTORABLE")

### FIXED CODE ###

S = str(input())
T = str(input())
slist = list(S)
tlist = list(T)
Slen = len(slist)
Tlen = len(tlist)
ANSlist = []
Flag = 0
if Slen < Tlen:
    Flag = 0
else:
    for i in range(Slen-Tlen+1):
        flag = 0
        for j in range(Tlen):
            if slist[i+j] == "?" or slist[i+j] == tlist[j]:
                pass
            else:
                flag = 1
                break
        if flag == 0:
            Skari = ""
            k = 0
            for k in range(i):
                if slist[k] == "?":
                    Skari+="a"
                else:
                    Skari+=slist[k]
            l = 0
            for l in range(Tlen):
                Skari+=tlist[l]
            m = 0
            Skarilen = len(Skari)
            for m in range(Slen-Skarilen):
                M = m+Skarilen
                if slist[M] == "?":
                    Skari+="a"
                else:
                    Skari+=slist[M]
            ANSlist.append(Skari)
            Flag+=1
        else:
            pass
if Flag >= 1:
    print(min(ANSlist))
else:
    print("UNRESTORABLE")
import numpy as np

N = int(input())
P = np.array(input().split(' '), dtype = int)
# P = np.array(list(map(int, input().split(' '))))

counta = 0
for i in range(N):
    counta += np.all((P[:i+1] >= P[i]))
print(counta)

### FIXED CODE ###

N, M = map(int, input().split(' '))
if N == M:
    print('Yes')
else:
    print('No')
a,b = map(int,input().split())
df = b-a
nums = []
cnt = 0
for i in range(1,1000):
    cnt += i
    nums.append(cnt)
    if nums[i] - nums[i-1] == df:
        print(nums[i] - b)
        exit()

### FIXED CODE ###

x,y = map(int,input().split())
h=y-x
a=0
for i in range(h-1):
   a+=i+1
print(a-x)
count = {} #a~zの出現回数を記録
for i in range(26):
    count[(i)] = 0

while True:
    text = []
    try:
        text = raw_input()
    except:
        break
    for i in range(len(text)):
        if(ord(text[i]) >= ord('a') and ord(text[i]) <= ord('z')):
            count[(ord(text[i]))-ord('a')] += 1
        if(ord(text[i]) >= ord('A') and ord(text[i]) <= ord('Z')):
            count[(ord(text[i]))-ord('A')] += 1

#出現回数の表示
for i in range(26):
    print '%s : %d' %(unichr(i+ord('a')), count[(i)])

### FIXED CODE ###

count = {}
for i in range(26):
    count[(i)] = 0

while True:
    try:
        x = raw_input()
    except:
        break
    for i in range(len(x)):
        if(ord('a') <= ord(x[i]) and ord(x[i]) <= ord('z')):
            count[(ord(x[i])-ord('a'))] += 1
        elif(ord('A') <= ord(x[i]) and ord(x[i]) <= ord('Z')):
            count[(ord(x[i])-ord('A'))] += 1

for i in range(26):
    print '%s : %d' %(chr(i+ord('a')), count[(i)])
exit(0)
N, A = map(int, input().split())
B = N * N - A
print(B)

### FIXED CODE ###

# N,A = map(int, input().split())
N = int(input())
A = int(input())
B = N * N - A
print(B)
a, b = input().split()
if a == "A":
    a1 = 10
if a == "B":
    a1 = 11
if a == "C":
    a1 = 12
if a == "D":
    a1 = 13
if a == "E":
    a1 = 14
if a == "F":
    a1 = 15
if b == "A":
    b== 10
if b == "B":
    b1 = 11
if b == "C":
    b1 = 12
if b == "D":
    b1 = 13
if b == "E":
    b1 = 14
if b == "F":
    b1 = 15
if a1 > b1:
    print(">")
elif a1 == b1:
    print("=")
else :
    print("<")

### FIXED CODE ###


a, b = input().split()
if a == "A":
    a1 = 10
if a == "B":
    a1 = 11
if a == "C":
    a1 = 12
if a == "D":
    a1 = 13
if a == "E":
    a1 = 14
if a == "F":
    a1 = 15
if b == "A":
    b1 =10
if b == "B":
    b1 = 11
if b == "C":
    b1 = 12
if b == "D":
    b1 = 13
if b == "E":
    b1 = 14
if b == "F":
    b1 = 15
if a1 > b1:
    print(">")
elif a1 == b1:
    print("=")
else :
    print("<")
s = input()
rest = 15 - len(s)
if s.count('o') + rest > 7:
    print('YES')
else:
    print('NO'

### FIXED CODE ###

s = input()
rest = 15 - len(s)
if s.count('o') + rest > 7:
    print('YES')
else:
    print('NO')
s = input()
k = int(input())

if s[:k] == '1'*k:
  print(1)
else:
  print(int(s.translate(str.maketrans('','','1'))[0]))


### FIXED CODE ###

s = list(map(int,list(input())))
k = int(input())

a = 0
i = 0

while a < k:
  a += min(s[i]**70, k)
  i +=1

print(s[i-1])
N, K = map(int,input().split())
ans = 0
a = [0]
b = [0]
c = [0]
for i in range(N):
    a[i] = i+1
    b[i] = i+1
    c[i] = i+1

ev = 0
ev2 = 0
od = 0
if K % 2 == 1:
    for i in range(N):
        if i % K == 0:
            od += 1

    print(od**3)
else:
    for i in range(N):
        if i % K == 0:
            ev += 1
        if i % (K/2) == 0:
            ev2 += 1
        if i % K == 0 and i % (K/2) == 0:
            od += 1
    ans = ev**3 + ev2**3 - od**3
    print(ans)
    

### FIXED CODE ###

N, K = map(int,input().split())
ans = 0

ev = 0
ev2 = 0
od = 0
if K % 2 == 1:
    print((N//K)**3)
else:
    ans = N//K
    for i in range(1,N+1):
        if i % K == (K//2):
            ev += 1
    print(ans**3 + ev**3)
N, M = map(int,input().split())
A = sorted(list(map(int, input().split())))
BC = [list(map(int, input().split())) for _ in range(M)]
s = ""
cnt = 0
for b, c in sorted(BC, key=lambda x:x[1], reverse=True):
  s += str(c) * b
  cnt += b
li = list(s)
for i in range(min(N, cnt)):
  if A[i] < int(li[i]):
    A[i] = int(li[i])
  else:
    break
print(sum(A))

### FIXED CODE ###

N, M = map(int,input().split())
A = sorted(list(map(int, input().split())))
BC = [list(map(int, input().split())) for _ in range(M)]
li = []
cnt = 0
for b, c in sorted(BC, key=lambda x:x[1], reverse=True):
  cnt += b
  for _ in range(b):
    li.append(c)
  if cnt >= N:
    break
for i in range(min(N,cnt)):
  if A[i] < li[i]:
    A[i] = li[i]
print(sum(A))
n , k = list(map(int, input().split()))
kaijou = []
kaijou.append(1)
kaijou.append(1)
i = 2
while(i <= n):
    kaijou.append(i * kaijou[i - 1])
    i += 1
for i in range(1, k + 1):
    if i <= n - k + 1: 
        b = (kaijou[k - 1] / (kaijou[i - 1] * kaijou[k - i]))
        a = (kaijou[n - k + 1] /  (kaijou[i] * kaijou[n - k + 1 - i]))
        print(int(a * b) % 1000000007)
    else:
        print(0)

### FIXED CODE ###

import numpy as np
import math

n , k = list(map(int, input().split()))
def combi(a,b):
    return  math.factorial(a) // (math.factorial(b) * math.factorial(a-b))
i = 2
mod = 10 ** 9 + 7
for i in range(1, k + 1):
    if n - k + 1 >= i and k - 1 >= i - 1:
        print(int(combi(n - k + 1,i) * combi(k - 1, i - 1) % mod))
    else:
        print(0)
D = input()
print("Christmas" + "Eve" * (25 - D))

### FIXED CODE ###

D = int(input())
print("Christmas"+" Eve"*(25 - D))
num = 0
while(true):
    x = input()
    num += 1
    if x == '0':
        break
    print("Case %d: %s".% num, x)

### FIXED CODE ###

import sys
num = 0
while(True):
    x = int(sys.stdin.readline())
    num += 1
    if x == 0:
        break
    print("Case %d: %d" % (num, x))