Harryxun/stf_run huggingface dataset:
def main():
  n = int(input())
  ls = []
  ls_count = []
  for i in range(n):
    item = input()
	if not item in ls:
      ls.append('item')
      ls_count.append(1)
    else:
      ls_count[ls.index(item)] += 1
  max_count = max(ls_count)
  max_index = [i for i, n in enumerate(ls_count) if n == max_count]
  ans = []
  for idx in max_index:
    ans.append(ls[idx])
  ans = sorted(ans)
  for itm in ans:
    print(itm)
  

if __name__ == '__main__':
  main()

### FIXED CODE ###

def main():
  n = int(input())
  dict = {}
  for i in range(n):
    s = input()
    dict.setdefault(s, 0)
    dict[s] += 1
  max_val = 0
  ans_ls = []
  for kv in dict.items():
    if kv[1] > max_val:
      max_val = kv[1]
      ans_ls = [kv[0]]    
    elif kv[1] == max_val:
      ans_ls.append(kv[0])
  ans_ls = sorted(ans_ls)
  for name in ans_ls:
    print(name)
 
 
if __name__ == '__main__':
  main()
a=input()
z=0
for i in range(4):
   z-=1 if a[i]=='-'else z+=1

### FIXED CODE ###

n = {"++++":4,"+++-":2,"++--":0,"+---":-2,"----":-4}
s = "".join(sorted(input()))
print(n[s])
n, m = map(int, input().split())

edges = [set() for _ in range(n)]

for _ in range(m):
    s, t = map(int, input().split())
    edges[s].add(t)
    edges[t].add(s)

prenum = [None] * n
parent = [None] * n
lowest = [None] * n
counter = 0
bridges = set()


def dfs(cur, prev):
    global counter
    prenum[cur] = lowest[cur] = counter
    counter += 1
    for edge in edges[cur]:
        if prenum[edge] is not None:
            if edge != prev:
                lowest[cur] = min(lowest[cur], prenum[edge])
            continue
        parent[edge] = cur
        dfs(edge, cur)
        lowest[cur] = min(lowest[cur], lowest[edge])
    if prenum[cur] == lowest[cur]:
        bridges.add((cur, prev) if cur < prev else (prev, cur))


dfs(0, -1)

for bridge in sorted(bridges)[1:]:
    print(*bridge)

### FIXED CODE ###

import sys

sys.setrecursionlimit(200000)

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

edges = [set() for _ in range(n)]

for _ in range(m):
    s, t = map(int, input().split())
    edges[s].add(t)
    edges[t].add(s)

prenum = [None] * n
parent = [None] * n
lowest = [None] * n
counter = 0
bridges = set()


def dfs(cur, prev):
    global counter
    prenum[cur] = lowest[cur] = counter
    counter += 1
    for edge in edges[cur]:
        if prenum[edge] is not None:
            if edge != prev:
                lowest[cur] = min(lowest[cur], prenum[edge])
            continue
        parent[edge] = cur
        dfs(edge, cur)
        lowest[cur] = min(lowest[cur], lowest[edge])
    if prenum[cur] == lowest[cur]:
        bridges.add((cur, prev) if cur < prev else (prev, cur))


dfs(0, -1)

for bridge in sorted(bridges)[1:]:
    print(*bridge)
a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")a,b=int(input())
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")

### FIXED CODE ###

a,b=map(int,input().split())
if a%3==0 or b%3==0 or (a+b)%3==0:
    print("Possible")
else:
    print("Impossible")
a=list(input().split())
print("Yes" if a[0]!=a[1] and a[0]!=a[2] and a[1]!=a[2] else "No")

### FIXED CODE ###

a=list(input())
print("Yes" if a[0]!=a[1] and a[0]!=a[2] and a[1]!=a[2] else "No")
n, c, k = map(int, input().split())

check = [0] * (n+10)

for i in range(n):
    check[int(input())] += 1

wait = False
time_cnt = 0
people_cnt = 0
ans = 0

for i in range(len(check)):
    if wait == False:
        if check[i] > 0:
            wait = True
            people_cnt += check[i]
            time_cnt = 1
            continue
        else:
            continue
        
    if people_cnt > c:
        ans += people_cnt//c
        people_cnt = people_cnt%c
        time_cnt = 1
        
    
    if time_cnt > k:
        ans += 1
        people_cnt = 0
        time_cnt = 0
        wait = False
    
    people_cnt += check[i]
    time_cnt += 1
else:
    if people_cnt > 0:
        ans += people_cnt//c
    if people_cnt%c > 0:
        ans += 1

print(ans)

### FIXED CODE ###

n, c, k = map(int, input().split())
from collections import deque

t = [int(input()) for _ in range(n)]
t.sort()
t=deque(t)

ans = 1
bus=t[0]+k
cnt = 0

while t:
    i=t.popleft()
    if i>bus:
        bus=i+k
        ans+=1
        cnt=1
    elif cnt==c:
        bus=i+k
        ans+=1
        cnt=1
    else:
        cnt+=1

print(ans)
def ans():
    tmp = -9999999999999
    N = int(input())
    F = [list(map(int, input().split())) for i in range(N)]
    P = [list(map(int, input().split())) for i in range(N)]

    def calculate(B):
        v = []
        for n in range(N):
            mcnt = 0
            for k in range(10):
                if B[k] == '1' and F[n][k] == 1:
                    mcnt += 1
            v.append(P[n][mcnt])
        return sum(v)

    for i in range(1, 1 << 10):
        bi = bin(i)
        bi = bi[2:]
        bi = '0' * (10 - len(bi)) + bi
        tmp = max(tmp, calculate(bi))
    return print(tmp)
  
  ans()

### FIXED CODE ###

def ans():
    tmp = -9999999999999
    N = int(input())
    F = [list(map(int, input().split())) for i in range(N)]
    P = [list(map(int, input().split())) for i in range(N)]

    def calculate(B):
        v = []
        for n in range(N):
            mcnt = 0
            for k in range(10):
                if B[k] == '1' and F[n][k] == 1:
                    mcnt += 1
            v.append(P[n][mcnt])
        return sum(v)

    for i in range(1, 1 << 10):
        bi = bin(i)
        bi = bi[2:]
        bi = '0' * (10 - len(bi)) + bi
        tmp = max(tmp, calculate(bi))
    return print(tmp)


ans()
n,m=map(int,input().split())
s=[list(map(int,input().split())) for _ in range(m)]
p=list(map(int,input().split()))

sum = 0
isAffectedSwitch=[[False for _ in range(n)] for _ in range(m)]
for i in range(m):
    for j in range(1,s[i][0]+1):
        isAffectedSwitch[i][s[i][j]-1]=True

C = []
for i in range(N):
    B = 0
    for j in range(M):
        if isAffectedSwitch[j][i] = True:
            B += 2**(M-j-1)
    C.append(B)

for i in range(2**N):
    A = 0
    for j in range(N):
        if (i >> j):
            A = A^C[j]
    if A == p:
        sum += 1
        
print(sum)

### FIXED CODE ###

n,m=map(int,input().split())
s=[list(map(int,input().split())) for _ in range(m)]
p=list(map(int,input().split()))

P = 0
for i in range(m):
    if p[i] == 1:
        P += 2**(m-i-1)
    
sum = 0
isAffectedSwitch=[[False for _ in range(n)] for _ in range(m)]
for i in range(m):
    for j in range(1,s[i][0]+1):
        isAffectedSwitch[i][s[i][j]-1]=True

C = []
for i in range(n):
    B = 0
    for j in range(m):
        if isAffectedSwitch[j][i] == True:
            B += 2**(m-j-1)
    C.append(B)

for i in range(2**n):
    A = 0
    for j in range(n):
        if ((i >> j)&1):
            A = A ^ C[j]
           
    if A == P:
        sum += 1
        
print(sum)
N=int(input())
for i range(1,int(int(N**0.5)+1):
    if N%i==0 and N//i<=9:
        print('Yes')
else:print('No')

### FIXED CODE ###

N=int(input())
for i in range(1,10):
    if N%i==0 and N//i<=9:
        print('Yes')
        break
else:print('No')
s = str( input() )
if s == "H H" | s == "D D" : 
   print( "H" ) 
else : 
   print( "D" ) 

### FIXED CODE ###

s = input()
if s == "H H" or s == "D D" : 
   print( "H" ) 
else : 
   print( "D" )
def gcd(a,b):
    x=int(max(a,b))
    y=int(min(a,b))
    if x%y==0:
        return y
    else:
        while x%y!=0:
            z=x%y
            x=y
            y=z
        else:
            return z
        
def lcm(a,b):
    return int(a*b/gcd(a,b))

N=int(input())

a=int(input())

for n in range(1,N):
    b=int(input())
    a=lcm(a,b)
print(a)

### FIXED CODE ###

def gcd(a,b):
    x=max(a,b)
    y=min(a,b)
    if x%y==0:
        return y
    else:
        while x%y!=0:
            z=x%y
            x=y
            y=z
        else:
            return z
        
def lcm(a,b):
    return int(a*b//gcd(a,b))

N=int(input())

a=int(input())

for n in range(1,N):
    b=int(input())
    a=lcm(a,b)
print(a)
N = int(input())
cnt = 0

def prime_factorize(n):
    a = []
    while n % 2 == 0:
        a.append(2)
        n //= 2
    f = 3
    while f * f <= n:
        if n % f == 0:
            a.append(f)
            n //= f
        else:
            f += 2
    if n != 1:
        a.append(n)
    return a
from collections import Counter

arr = prime_factorize(N)
c = Counter(arr)
cnt += len(c)
c = c.most_common()
for i in range(len(c)):
    cnt +=  c[i][1]-1//2

print(ans)


### FIXED CODE ###

import math
def get_prime(n):
    if n <= 1:
        return []
    prime = [2]
    if n > 2:
        limit = int(math.sqrt(n))
        odd = [i for i in range(3, n + 1, 2)]
        while limit >= odd[0]:
            prime.append(odd[0])
            odd = [j for j in odd if j % odd[0] != 0]
        prime += odd
    return prime

from collections import defaultdict
def prime_factorization(n):
    if n <= 1:
        return {}
    else:
        # print(int(math.sqrt(n)))
        prime = get_prime(int(math.sqrt(n)))
        dct = defaultdict(int)
        for p in prime:
            while n % p == 0:
                dct[p] += 1
                n //= p
        if n != 1:
            dct[n] += 1
        dct = dict(dct)
        return dct

n = int(input())
pf = prime_factorization(n)

Z = []
for k, v in pf.items():
    for i in range(1, v + 1):
        Z.append(k ** i)
Z.sort()
count = 0
for z in Z:
    if n % z == 0:
        count += 1
        n //= z
    if n == 1:
        break

print(count)
import numpy as np
import itertools
 
H, W, K = list(map(int, input().split())) 
c = [input().split("") for l in range(H)]
b=[]
d=[]
for m in range(len(c)):
  for item in c[m]:
    item_mod = item.replace("."  , "0")
    item_mod = item_mod.replace("#" , "1")
    b.append(item_mod)
  d.append(b)
  b=[]

C_arr = np.array(d , dtype = "int")
 
In = np.array(list(itertools.product([0,1] , repeat=H)))
Out = np.array(list(itertools.product([0,1] , repeat=W)))
 
ans = 0
for i in range(2**H):
  In_matrix = np.diag(In[i])
  for j in range(2**W):
    Out_matrix = np.diag(Out[j])
    
    In_C = np.dot(In_matrix , C_arr)
    In_C_Out = np.dot(In_C , Out_matrix)
    
    ICO = In_C_Out.flatten()
    ICO = ICO.tolist()
    
    if ICO.count(1) == K:
      ans += 1
      
print(ans)

### FIXED CODE ###

H, W, K = list(map(int, input().split()))
 
c = [list(input()) for i in range(H)]
 
cnt = 0
for i in range(2**H):
    for j in range(2**W):
        cnt_black = 0
        for k in range(H):
            if (i >> k) & 1:
                continue
            for l in range(W):
                if (j >> l) & 1:
                    continue
                if c[k][l] == '#':
                    cnt_black += 1
        if cnt_black == K:
            cnt += 1
 
print(cnt)
N = int(input())
S = input()
maxd = 0
for a in range(1,N-1):
    X = set([])
    Y = set([])
    for x in range(0,a):
        X.add(S[x])
    for y in range(a,N):
        Y.add(S[y])
    diffnum = len(X&Y)
    maxd = max(diffnum,maxd)
print(maxd)

### FIXED CODE ###

a,b = map(int,input().split())
temp = max(a+b,a-b)
print(max(temp,a*b))
# input
A, B, C, D = int(input())

# check
ans = len([1 for i in range(A, B + 1) if i % C != 0 and i % D != 0])

print(ans)


### FIXED CODE ###

# 判定機にmathがインストールされていないため、
# gcd=最小公倍数、lcm=最少公約数(返り値整数)を実装
def gcd(m, n):
    x = max(m, n)
    y = min(m, n)
    z = None
    if x % y == 0:
        return y
    else:
        while x % y != 0:
            z = x % y
            x = y
            y = z
        return z


def lcm(m, n):
    return (m * n) // gcd(m, n)


# input
A, B, C, D = map(int, input().split())

# check
AB = B - (A - 1)

C_cnt = B // C - (A - 1) // C
D_cnt = B // D - (A - 1) // D

lcm_CD = lcm(C, D)
lcm_cnt = B // lcm_CD - (A - 1) // lcm_CD

ans = AB - C_cnt - D_cnt + lcm_cnt

print(ans)
N, K, C = map(int, input().split())
S = input()

Af = [0]*N
Rf = [0]*N
d = 0
f = 0
for i, s in enumerate(S):
    f-=1
    if s=='o' and f<0:
        d+=1
        f=C
    Af[i]=d
    Rf[i]=C-f

Ab = [0]*N
Rb = [0]*N
d = 0
f = 0
for i, s in enumerate(S[::-1]):
    f-=1
    if s=='o' and f<0:
        d+=1
        f=C
    Ab[N-i-1]=d
    Rb[N-i-1]=C-f

if Ab[1]<K:
    print(1)

for i in range(1, N-1):
    if Af[i-1]+Ab[i+1]>K: continue
    if Af[i-1]+Ab[i+1]==K and Rf[i-1]+Rb[i+1]+1>=C: continue
    print(i+1)

if Af[-2]<K:
    print(N)


### FIXED CODE ###

N, K, C = map(int, input().split())
S = input()

if N==1:
  print(1)
  exit()

Af = [0]*N
Rf = [0]*N
d = 0
f = 0
for i, s in enumerate(S):
    f-=1
    if s=='o' and f<0:
        d+=1
        f=C
    Af[i]=d
    Rf[i]=C-f

Ab = [0]*N
Rb = [0]*N
d = 0
f = 0
for i, s in enumerate(S[::-1]):
    f-=1
    if s=='o' and f<0:
        d+=1
        f=C
    Ab[N-i-1]=d
    Rb[N-i-1]=C-f

if Ab[1]<K:
    print(1)

for i in range(1, N-1):
    if Af[i-1]+Ab[i+1]>K: continue
    if Af[i-1]+Ab[i+1]==K and Rf[i-1]+Rb[i+1]+1>=C: continue
    print(i+1)

if Af[-2]<K:
    print(N)
import numpy as np

L, R = list(map(int, input().split()))
data = np.array([x for x in range(L, R+1)]) % 2019
data = np.unique(data)
length = R - L

min_mod = 2018
for t in range(length):
    i = length - t
    for j in range(i):
        mod = data[i]* data[j]
        min_mod = mod if min_mod > mod else min_mod
        
print(min_mod)

### FIXED CODE ###

l, r = list(map(int,input().split()))

if r - l >= 2019:
  print(0)
  
else:
  ll = l % 2019
  rr = r % 2019
  if rr < ll:
    print(0)
    
  else:
    keep = 2020
    for i in range(ll, rr+1):
      for j in range(i+1, rr+1):
        keep = min((i*j)%2019, keep)
    print(keep)
n, k = map(int, input().split())
H = list(map(int, input().split()))

H.sort(reverse=True)
for i in range(k):
  H[i] = 0

print(sum(H))

### FIXED CODE ###

n, k = map(int, input().split())
H = list(map(int, input().split()))
if k>=n:
    print(0)
else:
  H.sort(reverse=True)
  for i in range(k):
    H[i] = 0

  print(sum(H))
import itertools

n, m, q = [int(x) for x in input().split()]
 
tmp = []
for i in range(q):
    a, b, c, d = [int(x) for x in input().split()]
    tmp.append([a, b, c, d])

t = list(itertools.combinations_with_replacement(range(1, m + 1), m-1))

score = 0
for _t in t:
    _s = 0
    for a, b, c, d in tmp:
        if c == _t[b - 1] - _t[a - 1]:
            _s += d
    score = max(_s, score)
print(score)

### FIXED CODE ###

import itertools

n, m, q = [int(x) for x in input().split()]
 
tmp = []
for i in range(q):
    a, b, c, d = [int(x) for x in input().split()]
    tmp.append([a, b, c, d])

t = list(itertools.combinations_with_replacement(range(1, m + 1), n))

score = 0
for _t in t:
    _s = 0
    for a, b, c, d in tmp:
        if c == _t[b - 1] - _t[a - 1]:
            _s += d
    score = max(_s, score)
print(score)
mport numpy as np
A, B = map(int, input().split())
while A%B > 0:
    c = A
    A = B
    B = c%B
P = [1]
if B%2 == 0:
    P.append(2)
for i in range(3, B//2 + 1, 2):
    if B%i == 0:
        P.append(i)
if B > 2:
    P.append(B)
    
l = len(P)
for i in range(2, l):
    if P[i] == 0:
        continue
    for j in range(i + 1, l):
        if P[j]%P[i] == 0:
            P[j] = 0
P = np.array(P)
print(np.where(P != 0)[0].size)

### FIXED CODE ###

def gcd(x, y):
    """
    ユークリッドの互除法を用いてxとyの最大公約数を求める。
    """
    while True:
        r = x%y
        if r == 0:
            break
        x = y
        y = r
    return y
    
def prime_factorize(x):
    """
    素因数分解
    """
    res = []
    while x%2 == 0:
        res.append(2)
        x = x//2
    p = 3
    while p*p <= x:
        while x%p == 0:
            res.append(p)
            x = x//p
        p += 2
    if x != 1:
        res.append(x)
    return res


A, B = map(int, input().split())
print(len(set(prime_factorize(gcd(A, B)))) + 1)
nums = input().split()
a = int(nums[0])
b = int(nums[1])
c = int(nums[2])
sorted(a, b, c)

### FIXED CODE ###

n = input().split()
a = int(n[0])
b = int(n[1])
c = int(n[2])
if a <= b <= c:
    print(a, b, c)
elif a <= c <= b:
    print(a, c, b)
elif b <= a <= c:
    print(b, a, c)
elif b <= c <= a:
    print(b, c, a)
elif c <= a <= b:
    print(c, a, b)
else:
    print(c, b, a)
S = input()
if S[0] == s[1] and s[1] == s[2]:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

S = input()
if S == 'AAA' or S == 'BBB':
  print('No')
else:
  print('Yes')
import math, string, itertools, fractions, heapq, collections, re,  array, bisect, sys, random, time, copy, functools
sys.setrecursionlimit(10**7)
inf = 10 ** 20
eps = 1.0 / 10**10
mod = 10**9+7
dd = [(-1, 0), (0, 1), (1, 0), (0, -1)]
ddn = [(-1, 0), (-1, 1), (0, 1), (1, 1), (1, 0), (1, -1), (0, -1), (-1, -1)]
def LI(): return [int(x) for x in sys.stdin.readline().split()]
def LI_(): return [int(x)-1 for x in sys.stdin.readline().split()]
def LF(): return [float(x) for x in sys.stdin.readline().split()]
def LS(): return sys.stdin.readline().split()
def _I(): return int(sys.stdin.readline())
def _F(): return float(sys.stdin.readline())
def _pf(s): return print(s, flush=True)

f = open('C_input_29.txt')
lines = f.readlines()
f.close()
N, M = map(int, lines[0].split())
A = []
for line in lines[1:]:
    A.append(int(line))

#  N, M = LI()
#  A = []
#  for i in range(M):
#      A.append(_I())

if M != 0:
    # 連続した壊れた段がある場合は0
    B = [i for i in A]
    B.remove(B[0])
    B.append(10**15+100)
    diffs = [b - a for a, b in zip(A,B)]
    #  print(diffs)

    if any(i == 1 for i in diffs):
        # 隣同士なので0
        print(0)
        exit()
#  print('hoge')
"""
考え方
xにたどり着く通りは、x-1とx-2段目にたどり着く通りの合計
dp
3が障害のとき
1へは1通り
2へは0からと1からの2通り
3へは0通り
4へは2からの2通りと、3からの0通りで2通り
5へは3からの0通りと4からの2通りで2通り
6へは4からの2通りと5からの2通りで4通り
"""
dp = {}
#  print('fua')
dp[0] = 1
dp[1] = 1 if 1 not in A else 0
[dp.update({i: (dp[i-1] + dp[i-2] )%mod}) if i not in A else dp.update({i: 0}) for i in range(2, N+1)]
#  for i in range(2, N+1):
#      print(i)
#      # i段目までの通りを計算する
#      if i in A:
#          # i段目が障害のときは0になっているので飛ばす
#          dp[i] = 0
#          continue
    
#      dp[i] = dp[i-1] + dp[i-2]

print(dp[N] % mod)



### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys

mod = 10 ** 9 + 7

def get_nums(n):
    res = [0 for _ in range(n)]
    for i in range(n):
        res[i] = int(input())
    return res


def get_numbers():
    return map(int, input().split())


n, m = get_numbers()
a = set(get_nums(m))

dp = [0 for _ in range(n + 1)]
dp[0] = 1
if 1 not in a:
    dp[1] = 1

for i in range(2, n + 1):
    if i not in a:
        dp[i] = dp[i - 1] + dp[i - 2]
        dp[i] %= mod

print(dp[-1])
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N, L, T = map(int, readline().split())
    position = []
    #0をL-1からーに時計回りに超える場合は+1
    #0からL-1に反時計回りに超える場合は-1
    count = 0
    for i in range(N):
        x,w = map(int, readline().split())
        if w==1:
            count += (x+T)//L
            position.append((x+T)%L)
        else:
            if x-T<0:
                count += (x-T+1)//L
            position.append((x-T)%L)
    position.sort()
    if count>=0:
        ans = position[count:] + position[:count]
    print(ans)


if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7

def main():
    N, L, T = map(int, readline().split())
    position = []
    #0をL-1からーに時計回りに超える場合は+1
    #0からL-1に反時計回りに超える場合は-1
    count = 0
    for i in range(N):
        x,w = map(int, readline().split())
        if w==1:
            count += (x+T)//L
            position.append((x+T)%L)
        else:
            if x-T<0:
                count += (x-T)//L
            position.append((x-T)%L)
    position.sort()
    count %= N
    ans = position[count:] + position[:count]
    for i in range(N):
        print(ans[i])


if __name__ == '__main__':
    main()
def solve():
  N = int(input())
  X = input()
  x = sum(map(int,list(X)))
  dp = [0]*N
  for i in range(1,N):
    dp[i] = dp[i%sum(map(int,list(bin(i)[2:])))]+1
  cnt = 0
  if x==1:
    cnt1 = 0
  elif x>1:
    for i in range(N):
      cnt1 += int(X[-i-1])*pow(2,i,x-1)
      cnt1 %= x-1
  cnt2 = 0
  for i in range(N):
    cnt2 += int(X[-i-1])*pow(2,i,x+1)
    cnt2 %= x+1
  
  ans = [0]*N
  for i in range(N):
    if X[i]=='1':
      if x==1:
        ans[i] = 0
      else:
        num = (cnt1-pow(2,N-i-1,x-1))%(x-1)
        ans[i] = dp[num]+1
    else:
      num = (cnt2+pow(2,N-i-1,x+1))%(x+1)
      ans[i] = dp[num]+1
  return ans
print(*solve(),sep='\n')

### FIXED CODE ###

def solve():
  N = int(input())
  X = input()
  x = sum(map(int,list(X)))
  dp = [0]*N
  for i in range(1,N):
    dp[i] = dp[i%sum(map(int,list(bin(i)[2:])))]+1
  cnt1 = 0
  if x>1:
    for i in range(N):
      cnt1 += int(X[-i-1])*pow(2,i,x-1)
      cnt1 %= x-1
  cnt2 = 0
  for i in range(N):
    cnt2 += int(X[-i-1])*pow(2,i,x+1)
    cnt2 %= x+1
  
  ans = [0]*N
  for i in range(N):
    if X[i]=='1':
      if x==1:
        ans[i] = 0
      else:
        num = (cnt1-pow(2,N-i-1,x-1))%(x-1)
        ans[i] = dp[num]+1
    else:
      num = (cnt2+pow(2,N-i-1,x+1))%(x+1)
      ans[i] = dp[num]+1
  return ans
print(*solve(),sep='\n')
S = raw_input()
if 'a' in S and 'b' in S and 'c' in S:
    print 'true'
else:
    print 'false'

### FIXED CODE ###

S = input()
if 'a' in S and 'b' in S and 'c' in S:
    print ('Yes')
else:
    print ('No')
A, B = map(int, input().split())
if A == B:
  print("Draw")
elif A == 1 and :
  print("Alice")
elif B == 1:
  print("Bob")
elif A > B:
  print("Alice")
else:
  print("Bob")

### FIXED CODE ###

A, B = map(int, input().split())
if A == B:
  print("Draw")
elif A == 1:
  print("Alice")
elif B == 1:
  print("Bob")
elif A > B:
  print("Alice")
else:
  print("Bob")
n, k = map(int, input().split())
p = list(int(i) for i in input().split())

kitai = list(map(lambda x: (x+1)/2, p))

gokei = 0

for i in range(n-k+1):
    wa = sum(kitai[i:i+k])
    if gokei < wa:
        gokei = wa

print(gokei)

### FIXED CODE ###

s, t = input().split()
a, b = map(int, input().split())
u = input()

if s==u:
    a=a-1
else:
    b=b-1

print(a, b)