Harryxun/stf_run huggingface dataset:
H,W=map(int,input().split())
series = [[] for h in range(H)]
for h in range(H):
	series[h] = list(input())
check = [[0 for w in range(W)] for h in range(H)]
def Go(h,w):
	global c
	check[h][w]=1
	count = 0
	front = ""
	tmp=0
	if series[h][w] == "#":
		front = "."
	else:
		front = "#"
	if h >= 1:
		if series[h-1][w] == front and check[h-1][w] == 0:
			if series[h-1][w] == ".":
				count += Go(h-1,w)+1
			else:
				count += Go(h-1,w)
				c += 1
				used[h-1][w] = 1
	if h < H-1:
		if series[h+1][w] == front and check[h+1][w] == 0:
			if series[h+1][w] == ".":
				count += Go(h+1,w)+1
			else:
				count += Go(h+1,w)
				c += 1
				used[h+1][w] = 1
	if w >= 1:
		if series[h][w-1] == front and check[h][w-1] == 0:
			if series[h][w-1] == ".":
				count += Go(h,w-1)+1
			else:
				count += Go(h,w-1)
				c += 1
				used[h][w-1] = 1
	if w < W-1:
		if series[h][w+1] == front and check[h][w+1] == 0:
			if series[h][w+1] == ".":
				count += Go(h,w+1)+1
			else:
				count += Go(h,w+1)
				c += 1
				used[h][w+1] = 1
	return count

ans=0
used =  [[0 for w in range(W)] for h in range(H)]
for h in range(H):
	for w in range(W):
		if series[h][w] == "#" and used[h][w] == 0:
			c=1
			ans += Go(h,w) * c
			check = [[0 for w in range(W)] for h in range(H)]
print(ans)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000000)
H,W=map(int,input().split())
series = [[] for h in range(H)]
for h in range(H):
	series[h] = list(input())

def Go(h,w):
	#print(h,w)
	global c
	check[h][w]=1
	count = 0
	front = ""
	if series[h][w] == "#":
		front = "."
	else:
		front = "#"
	if h >= 1:
		if series[h-1][w] == front and check[h-1][w] == 0:
			if series[h-1][w] == ".":
				count += Go(h-1,w)+1
			else:
				count += Go(h-1,w)
				c += 1
				used[h-1][w] = 1
	if h < H-1:
		if series[h+1][w] == front and check[h+1][w] == 0:
			if series[h+1][w] == ".":
				count += Go(h+1,w)+1
			else:
				count += Go(h+1,w)
				c += 1
				used[h+1][w] = 1
	if w >= 1:
		if series[h][w-1] == front and check[h][w-1] == 0:
			if series[h][w-1] == ".":
				count += Go(h,w-1)+1
			else:
				count += Go(h,w-1)
				c += 1
				used[h][w-1] = 1
	if w < W-1:
		if series[h][w+1] == front and check[h][w+1] == 0:
			if series[h][w+1] == ".":
				count += Go(h,w+1)+1
			else:
				count += Go(h,w+1)
				c += 1
				used[h][w+1] = 1
	return count

ans=0
used =  [[0 for w in range(W)] for h in range(H)]
check = [[0 for w in range(W)] for h in range(H)]
for h in range(H):
	for w in range(W):
		if series[h][w] == "#" and used[h][w] == 0:
			c=1
			ans += Go(h,w) * c
print(ans)
from collections import deque

n = int(input())
linked_list = deque([])

for i in range(n):
    line = input().split()
    cmd = line[0]

    if len(line) == 2:
        value = line[1]

    if cmd == "insert":
        linked_list.insert(0, value)
    elif cmd == "delete":
        linked_list.remove(value)
    elif cmd == "deleteFirst":
        linked_list.popleft()
    elif cmd == "deleteLast":
        linked_list.pop()

print(*linked_list)

### FIXED CODE ###


import sys
from collections import deque

n = int(sys.stdin.readline())

inputs = []

for i in range(n):
    inputs.append(sys.stdin.readline().split())

linked_list = deque([])

for line in inputs:
    cmd = line[0]

    if len(line) == 2:
        value = line[1]

    if cmd == "insert":
        linked_list.appendleft(value)
    elif cmd == "delete":
        if value in linked_list:
            linked_list.remove(value)
    elif cmd == "deleteFirst":
        linked_list.popleft()
    elif cmd == "deleteLast":
        linked_list.pop()

print(*linked_list)
def a():
  s = input()
  t = input()
  s = ''.join(sorted(s))
  t = ''.join(sorted(t, reverse = True)
  if s < t :
    print('Yes')
  else:
    print('No')
  return 0
          
a()

### FIXED CODE ###

def a():
  s = input()
  t = input()
  s = ''.join(sorted(s))
  t = ''.join(sorted(t, reverse = True))
  
  if s < t:
    print('Yes')
  else:
    print('No')
   
  return 0

a()
N = input()
if N % 2 == 0:
  print(N/2)
else:
  print((N+1)/2)


### FIXED CODE ###

N = int(input())
if N % 2 == 0:
  print(int(N/2))
else:
  print(int((N+1)/2))
k = int(input())

if k == 0:
  print(0)
else:
  even = k//2
  if k%2==0:
    odd = k-1
  else:
  odd = k
  print(str(even*odd))

### FIXED CODE ###

k = int(input())

if k == 0:
  print(0)
else:
  if k%2==0:
    even = k
    odd = k-1
  else:
    even = k - 1
    odd = k
  print(str((even//2)*((odd+1)//2)))
A,B,C,D = input()
S = (A+B+C+D)
S1 = []
if A == B == C== D:
    print('No')
    ezxt()
for i in S:
    if i.strip(A) !='':
        S1.append(i.strip(A))
if S1[0] == S1[1] and len(S1) == 2 and len(S2) == 2:
    print("Yes")
else :
    print("No")


### FIXED CODE ###

A,B,C,D = input()
S = (A+B+C+D)
S1 = []
if A == B == C== D:
    print('No')
    exit()
for i in S:
    if i.strip(A) !='':
        S1.append(i.strip(A))
if len(S1) == 2:
        if S1[0] == S1[1]:
            print("Yes")
        else:
            print("No")
else :
    print("No")
a,b,c = map(int, input())
if a==b==c:
  print('No')
elif a==b or b==c or a==c:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

a,b,c = map(int, input().split())
if a==b==c:
  print('No')
elif a==b or b==c or a==c:
  print('Yes')
else:
  print('No')
# coding: utf-8
# Your code here!

a =input()
N=list(a)

count=[]
def search(x):
    n=len(N)
    if(x+1>=n):
        return 
    
    if(N[x]=="0" and N[x+1]=="1"):
        #print(N)
        del N[x]
        del N[x+1]
        #print(N)
        count.append(0)
        x=0
    if(N[x]=="1" and N[x+1]=="0"):
        #print(N)
        del N[x]
        del N[x+1]
        #print(N)
        count.append(0)
        x=0    
        
    search(x+1)
ans=search(0)
#print(N)
if(len(count)!=0):
    print(len(count)*2+2)
else:
    print(0)

### FIXED CODE ###

# coding: utf-8
# Your code here
# coding: utf-8
# Your code here!

a =input()
N=list(a)
b=0
r=0
for i in N:
    if(i=="0"):
        b+=1
    else:
        r+=1
ans=r
if(r>b):
    ans=b
print(ans*2)
#!/usr/bin/env python
import sys
from collections import Counter
from itertools import permutations, combinations
#from fractions import gcd
from math import gcd
from math import ceil, floor
import bisect
sys.setrecursionlimit(10 ** 6)
inf = float("inf")

def input():
    return sys.stdin.readline()[:-1]

def chmin(a, b):
    if a > b:
        return b
    else:
        return a

def chmax(a, b):
    if a < b:
        return b
    else:
        return a

def main():
    n, k = map(int, input().split())
    h = tuple(map(int, input().split()))
    dp = [inf] * 110000

    dp[0] = 0
    for i in range(n-1):
        for j in range(1, min(k+1, n-i)):
            dp[i+j] = chmin(dp[i+j], dp[i] + abs(h[i+j] - h[i]))
    print(dp[n-1])

if __name__ == '__main__':
    main()



### FIXED CODE ###

#!/usr/bin/env python
import sys
from collections import Counter
from itertools import permutations, combinations
from math import ceil, floor
import bisect
sys.setrecursionlimit(10 ** 6)
inf = float("inf")

def input():
    return sys.stdin.readline()[:-1]

def chmin(a, b):
    if a > b:
        return b
    else:
        return a

def chmax(a, b):
    if a < b:
        return b
    else:
        return a

def main():
    n, k = map(int, input().split())
    h = tuple(map(int, input().split()))
    dp = [inf] * 110000

    dp[0] = 0
    for i in range(n-1):
        for j in range(1, min(k+1, n-i)):
            dp[i+j] = chmin(dp[i+j], dp[i] + abs(h[i+j] - h[i]))
    print(dp[n-1])

if __name__ == '__main__':
    main()
a,b,c,d,e,f=map(int, input().split())
amax=f//(a*100)
bmax=f//(b*100)
c_list=[]
sw_list=[]
s_list=[]

for i in range(amax+1):
   for j in range(bmax+1):
       water=100*a*i+100*b*j
       if water>0:
           smax=f-water
           for k in range(smax+1):
               for l in range(smax+1):
                   sugar=c*k+d*l
                   if water*e/100>=sugar and sugar>0:
                       concentration=100*sugar/(water+sugar)
                       c_list.append(concentration)
                       sw_list.append(sugar+water)
                       s_list.append(sugar)
num=c_list.index(max(c_list))
print(sw_list[num],s_list[num])


### FIXED CODE ###

a,b,c,d,e,f=[int(i) for i in input().split()]

max_a=f//(100*a)
max_b=f//(100*b)
max_c=f//c
max_d=f//d

#水リスト
x_list=[]
for i in range(max_a+1):
   for j in range(max_b+1):
        #水
       x=100*a*i+100*b*j
       if 0<x<=f and x not in x_list:
           x_list.append(x)
#print(x_list)
       
#砂糖リスト
y_list=[]
for i in range(max_c+1):
   for j in range(max_d+1):
        #砂糖
       y=c*i+d*j
       if 0<=y<f and y not in y_list:
           y_list.append(y)
#print(y_list)

concentration_list=[]
sugar_water_list=[]
sugar_list=[]

for i in x_list:
   for j in y_list:
       if i+j<=f and j/i<=e/100:
           concentration=100*j/(i+j)
           concentration_list.append(concentration)
           sugar_water_list.append(i+j)
           sugar_list.append(j)
                   
sugar_index=concentration_list.index(max(concentration_list))
print(sugar_water_list[sugar_index],sugar_list[sugar_index])
print(sum([s != t for s, t in zip(input().split())]))

### FIXED CODE ###

s = input()
t = input()
print(sum([s[i] != t[i] for i in range(len(s))]))
N, M = map(int, input().split())
a = [int(input()) for i in range(M)]
dp = [0]*(N+1)
div = 10**9 + 7
#dp[x] = dp[x-1] + dp[x-2]になる
dp[0] = 1
dp[1] = 1 if a[0] != 1 else 0

for x in range(2, N+1):
  if (x-1 in a and x-2 in a) or (x in a):
    dp[x] = 0
  elif x-1 in a:
    dp[x] = dp[x-2]
  elif x-2 in a:
    dp[x] = dp[x-1]
  else:
    dp[x] = dp[x-1]+dp[x-2]

print(dp[-1]%div)


### FIXED CODE ###

N,M=map(int,input().split())
a = [int(input()) for _ in range(M)]
dp = [0]*(N+1)
j = 0
dp[0] = 1
mod = 10**9+7
for i in range(1, N+1):
    if j < M and i == a[j]:
        j += 1
    elif i == 1:
        dp[i] = 1
    else:
        dp[i] = (dp[i-1]+dp[i-2]) % mod
print(dp[N])
n = input()
inf = 1000000000
M = [[inf for i in range(n)] for i in range(n)]
for i in range(n):
  str = raw_input().split()
  u = int(str[0])
  k = int(str[1])
  for j in range(k):
    v = int(str[2+j])
    c = int(str[3+j])
    M[u][v] = c
d = [inf for i in range(n)]
color = [0 for i in range(n)]

d[0] = 0
color[0] = 1

while 1:
  minv = inf
  u = -1
  for i in range(n):
    if minv>d[i] and color[i]!=2:
      u = i
      minv = d[i]
    print minv
  if u == -1:
    break
  color[u] = 2
  for v in range(n):
    if color[v]!=2 and M[u][v]!=inf:
      if d[v]>d[u]+M[u][v]:
        d[v] = d[u] + M[u][v]
        color[v] = 1
for i in range(n):
  if d[i]==inf:
    print '%d -1' % i
  else:
    print '%d %d' % (i, d[i])

### FIXED CODE ###

n = input()
inf = 1000000000
M = [[inf for i in range(n)] for i in range(n)]
for i in range(n):
  str = map(int, raw_input().split())
  u = str[0]
  k = str[1]
  for j in range(k):
    v = str[2+2*j]
    c = str[3+2*j]
    M[u][v] = c
d = [inf for i in range(n)]
color = [0 for i in range(n)]
 
d[0] = 0
color[0] = 1
 
while 1:
  minv = inf
  u = -1
  for i in range(n):
    if minv>d[i] and color[i]!=2:
      u = i
      minv = d[i]
  if u == -1:
    break
  color[u] = 2
  for v in range(n):
    if color[v]!=2 and M[u][v]!=inf:
      if d[v]>d[u]+M[u][v]:
        d[v] = d[u] + M[u][v]
        color[v] = 1
for i in range(n):
  if d[i]==inf:
    print '%d -1' % i
  else:
    print '%d %d' % (i, d[i])
n, h = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

a_all = [_ab[0] for _ab in ab]
b_all = [_ab[1] for _ab in ab]

a_max = max(a_all)

b_all_useful = []
for b in b_all:
    if b > a_max:
        b_all_useful.append(b)

b_all_useful.sort()

useful_sum = sum(b_all_useful)
if useful_sum > h:
    counter = 0
    i = 0
    while True:
        counter += b_all_useful[-1 * ii]
        i += 1
        if counter >= h:
            break
    print(i)

else:
    h_new = h - useful_sum
    import math
    print(math.ceil(h_new / a_max) + len(b_all_useful))


### FIXED CODE ###

n, h = map(int, input().split())
ab = [list(map(int, input().split())) for _ in range(n)]

a_all = [_ab[0] for _ab in ab]
b_all = [_ab[1] for _ab in ab]

a_max = max(a_all)

b_all_useful = []
for b in b_all:
    if b > a_max:
        b_all_useful.append(b)

b_all_useful.sort()

useful_sum = sum(b_all_useful)
if useful_sum > h:
    counter = 0
    i = 0
    while True:
        counter += b_all_useful[-1 * (i + 1)]
        i += 1
        if counter >= h:
            break
    print(i)

else:
    h_new = h - useful_sum
    import math
    print(math.ceil(h_new / a_max) + len(b_all_useful))
#ABC132 C

N = int(input())
D = list(map(int,input().split()))
count = 0
for K in range(N):
    A = []
    B = []
    if D[i] >= K:
        A.append(D[i])
    else:
        B.append(D[i])
    if len(A) == len(B):
        count += 1
    
print(count)

### FIXED CODE ###

#ABC132 C

N = int(input())
D = list(map(int,input().split()))
D.sort()
A = list(range(D[int(N/2)-1]+1,D[int(N/2)]+1))

print(len(A))
import math

L, R = map(int, input().split())
ans = math.inf
for i in range(L, R+1):
    for j in range(i+1, R+1):
        ans = min(ans, i * j % 2019)
        if ans == 0:
            print(0)
            exit()
print(ans)

### FIXED CODE ###

L, R = map(int, input().split())
ans = float('inf')
for i in range(L, R+1):
    for j in range(i+1, R+1):
        ans = min(ans, i * j % 2019)
        if ans == 0:
            print(0)
            exit()
print(ans)
H, N = map(int, input().split(' '))
sum = 0
for i in range(N):
  damage = int(input())
  sum += damage
  
if sum >= H:
  print('Yes')
else:
  print('No')
  

### FIXED CODE ###

H, N = map(int, input().split(' '))
numlist = input().split(' ')
count = 0
for num in numlist:
  count += int(num)
  
if count >= H:
  print('Yes')
else:
  print('No')
#coding:utf-8
#1_9_C
s = set()
while True:
    cmd = input().split()
    if cmd[0] == "end":
        break
    elif cmd[0] == "insert":
        l.add(int(cmd[1]))
    else:
        print(max(s))
        l.remove(max(s))

### FIXED CODE ###

#coding:utf-8
#1_9_C
import heapq

h = []
while True:
    cmd = input().split()
    if cmd[0] == "end":
        break
    elif cmd[0] == "insert":
        heapq.heappush(h, -int(cmd[1]))
    else:
        print(-heapq.heappop(h))
n,k = (int(x) for x in input().split())
h = list(map(int, input().split()))

h.sort()
i=0
while h[i]<k:
　　i+=1

print(n-i)

### FIXED CODE ###

N, K = map(int, input().split())
h = list(map(int, input().split()))
 
cnt = 0
for i in range(len(h)):
    if h[i] >= K:
        cnt += 1 
print(cnt)
import numpy as np
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))

mi = []
pl = []
sum = 0
if (sum(B) > sum(A)):
    print('-1')
    exit()

else:
    for i in range(N):
        s[i] = A[i] - B[i]
        if s[i] < 0:
            mi.append(-s[i])
        elif s[i] > 0:
            pl.append(s[i])

            
pl.sort(reverse=True)
p = sum(mi)
if (p != 0) and (len(pl) != 0):
    count = 1
    for i in pl:
        if p-i > 0:
            p -= i
            count += 1
        else:
            break
        
    else:
        print('-1')
        exit()
elif(p == 0) and (len(pl) != 0):
    print('0')
else:
    count = 0

print(len(mi)+count)
        
    
    
    
    

### FIXED CODE ###

import numpy as np
N = int(input())
A = list(map(int,input().split()))
B = list(map(int,input().split()))

mi = []
pl = []

for i in range(N):
    s = A[i] - B[i]
    if s < 0:
        mi.append(s)
    elif s > 0:
        pl.append(s)

            
pl.sort(reverse=True)
p = np.sum(mi)



if (len(pl)>0)and(len(mi)>0):
    count = 0
    for i in pl:
        if p + i < 0:
            p += i
            count += 1
            continue
        else:
            count += 1
            break
    else:
        print('-1')
        exit()

    print(count + len(mi))
    
        
elif len(mi) == 0:
    print('0')
    exit()
else:
    print('-1')
    exit()
N, M = int(input().split())  # N個のスイッチ, M個の電球

# M個の電球がそれぞれどこのスイッチと繋がっているかを格納
SSS = [list(map(int, input().split()))[1:] for i in range(M)]
P = list(map(int, input().split()))

ans = 0

for i in range(1 << N):  # 2のN乗の値になる, bit全探索
    for mask in range(M):
        ans_2 = 0
        for s in SSS[mask]:
            if (1 << s-1) & i != 0:
                ans_2 += 1

        if ans_2 % 2 != P[mask]:
            break
    else:
        ans += 1

print(ans)


### FIXED CODE ###

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

# 繋がってるスイッチの情報
S = [list(map(int, input().split()))[1:] for _ in range(M)]
P = list(map(int, input().split()))

# print(S)
# print(P)

ans = 0

for i in range(1 << N):
    # print(i)
    for m in range(M):
        cnt = 0
        for s in S[m]:  # Sは繋がっているスイッチの情報
            if i & (1 << (s-1)) != 0:
                cnt += 1
        if cnt % 2 != P[m]:
            break
    else:
        ans += 1

print(ans)
def main():
    import numpy as np
    n = int(input())
    graph = np.ones((n,n))*-1
    come = np.ones(n)*-1
    for i in range(n-1):
        u,v,w = map(int,input().split())
        graph[u-1][v-1] = graph[v-1][u-1] = w%2
    que = [0]
    come[0] = 0
    while len(que)>0:
        s = que.pop(0)
        for i,nv in enumerate(graph[s]):
            if nv!=-1:
                if come[i]!=-1:
                    continue
                if nv==0:
                    come[i]=come[s]
                else:
                    come[i]=(come[s]+1)%2
                que.append(i)
    for i in range(n):
        print(str(int(come[i])))
            
if __name__ == "__main__":
    main()

### FIXED CODE ###

def main():
    n = int(input())
    ki = {}
    for i in range(1,n+1):
        ki[i] = []
    for i in range(n-1):
        u,v,w = map(int,input().split())
        ki[u] += [[v,w%2]]
        ki[v] += [[u,w%2]]
    cl = [-1 for i in range(n)]
    cl[0] = 0
    que = [0]
    while len(que)>0:
        q = que.pop(0)
        for v in ki[q+1]:
            if cl[v[0]-1] != -1:
                continue
            if v[1]==1:
                cl[v[0]-1] = (cl[q]+1)%2
                que.append(v[0]-1)
            else:
                cl[v[0]-1] = cl[q]
                que.append(v[0]-1)
    for i in range(n):
        print(cl[i])

if __name__ == "__main__":
    main()
N=input()

a==N//100
b==(N-(a*100))//10
c==(N-(a*100+b*10))

if ((a == 7) or (b == 7) or (c==7)):
    print("Yes")
else:
    print("No")

### FIXED CODE ###

N=int(input())

a=N//100
b=(N-(a*100))//10
c=(N-(a*100+b*10))

if ((a == 7) or (b == 7) or (c == 7)):
    print("Yes")
else:
    print("No")
n = int(input())
A = list(map(int, input().split()))

Colors = [0 for _ in range(7)]
any_color = 0

for a in A:
    if a <= 399:
        Colors[0] = 1
    elif a <= 799:
        Colors[1] = 1
    elif a <= 1199:
        Colors[2] = 1
    elif a <= 1599:
        Colors[3] = 1
    elif a <= 1999:
        Colors[4] = 1
    elif a <= 2399:
        Colors[5] = 1
    elif a <= 2799:
        Colors[6] = 1
    elif a <= 3199:
        Colors[7] = 1
    else:
        any_color += 1

ans_min = sum(Colors)
ans_max = sum(Colors) + any_color

print(str(ans_min) + ' ' + str(ans_max))

### FIXED CODE ###

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

Colors = [0 for _ in range(8)]
any_color = 0

for a in A:
    if a <= 399:
        Colors[0] = 1
    elif a <= 799:
        Colors[1] = 1
    elif a <= 1199:
        Colors[2] = 1
    elif a <= 1599:
        Colors[3] = 1
    elif a <= 1999:
        Colors[4] = 1
    elif a <= 2399:
        Colors[5] = 1
    elif a <= 2799:
        Colors[6] = 1
    elif a <= 3199:
        Colors[7] = 1
    else:
        any_color += 1

ans_min = max(sum(Colors), 1)
ans_max = sum(Colors) + any_color

print(str(ans_min) + ' ' + str(ans_max))
s=list(input())
t=list(input())
k=0
for i in range(len(t)):
    if s[i]==t[i]:        
        print('Yes')
        exit()
    elif k=len(t):print('No')
    else:
      s.insert(0,s.pop(-1))
      k+=1

### FIXED CODE ###

s=input()
t=input()
for i in range(len(s)):
    if s[i:len(s)]+s[:i]==t:
        print('Yes')
        exit()
print('No')
import math
import sys
import collections
import bisect
import sympy
readline = sys.stdin.readline


def main():
    n = int(readline().rstrip())
    s = readline().rstrip()
    cnt = 0
    for i in range(1000):
        x = str(i).zfill(3)
        a = s.find(x[0])
        b = s[a+1:].find(x[1])
        c = s[a+b+2:].find(x[2])
        if -1 not in (a, b, c):
            cnt += 1
    print(cnt)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import math
import sys
import collections
import bisect
readline = sys.stdin.readline


def main():
    n = int(readline().rstrip())
    s = readline().rstrip()
    cnt = 0
    for i in range(1000):
        x = str(i).zfill(3)
        a = s[:-1].find(x[0])
        if a != -1:
            b = s[a + 1: -1].find(x[1])
            if b != -1:
                c = s[a + b + 2:].find(x[2])
                if c != -1:
                    cnt += 1

    print(cnt)


if __name__ == '__main__':
    main()
a = int(input()),b = int(input())

m = a*b,s = a+b*2

print("m,s")

### FIXED CODE ###

x, y = input().split()
print(int(x)*int(y), (int(x)+int(y))*2)
H = int(input())
A = int(input())
count = 0


while H > 0:
    H -= A
    count +=1
else:
    print(count)

### FIXED CODE ###

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


count = 0

while H > 0:
    H -= A
    count +=1

print(count)
A, B, K = map(int, input().split())
count = 0
while count<K:
    if count%2==0:
        if A%2==0:
            A//=2
            B+=A
        else:
            A-=1
            A//=2
            B+=A
    else:
        if B%2==0:
            B//=2
            A+=B
        else:
            B-=1
            B//=2
            A+=B
    count+=1
print(A,B)

### FIXED CODE ###

S=input()
if len(S)==2:
    print(S)
elif len(S)==3:
    print(S[::-1])
a,b = int(input().split)

if a ==b :
    print("Draw")
elif a == 1 or a>b:
    print("Alice")
else:
    print("Bob")

### FIXED CODE ###

a, b = (int(i) for i in input().split())

if a==1:
    a=14

if b==1:
    b=14

if a==b:
    print("Draw")
elif a>b:
    print("Alice")
else:
    print("Bob")
#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))


N,M = map(int,input().split())
A = [list(input()) for _ in range(N)]
B = [list(input()) for _ in range(M)]

flg1 = 1
flg2 = 0
for i in range(N):
    if flg2:
        break
    for j in range(N):
        if flg2:
            break
        flg1 = 1
        
        for k in range(M):
            if not(flg1):
                break
            for l in range(M):
                if A[i+k][j+l]==B[k][l]:
                    continue
                else:
                    flg1 = 0
        else:
            print("Yes")
            flg2 = 1
else:
    print("No")

### FIXED CODE ###

#n = int(input())
#n,k = map(int,input().split())
#x = list(map(int,input().split()))


N,M = map(int,input().split())
A = [list(input()) for _ in range(N)]
B = [list(input()) for _ in range(M)]

flg1 = 1
flg2 = 0
for i in range(N-M+1):
    if flg2:
        break
    for j in range(N-M+1):
        if flg2:
            break
        flg1 = 1
        
        for k in range(M):
            if not(flg1):
                break
            for l in range(M):
                if A[i+k][j+l]==B[k][l]:
                    continue
                else:
                    flg1 = 0
        else:
            if flg1:
                print("Yes")
                flg2 = 1
else:
    if not(flg2):
        print("No")