Harryxun/stf_run huggingface dataset:
a, b = list(map(int, input().split()))
grid = list()
grid.append([-1 for _ in range(b + 2)])
for t in range(0, a):
    grid.append([-1])
    line = list(input())
    for k in range(len(line)):
        if line[k] == '#':
            grid[t + 1] += [-1]
        else:
            grid[t + 1] += [0]
    grid[t + 1] +=[-1]
grid.append([-1 for _ in range(b + 2)])
grid[1][1] = 1
for y in range(1, a + 1):
    for x in range(1, b + 1):
        if grid[x][y] > 0:
            if grid[x + 1][y] != -1:
                grid[x + 1][y] += grid[x][y]
            if grid[x][y + 1] != -1:
                grid[x][y + 1] += grid[x][y]
print(grid[-2][-2])

### FIXED CODE ###

a, b = list(map(int, input().split()))
grid = list()
grid.append([-1 for _ in range(b + 2)])
for t in range(0, a):
    grid.append([-1])
    line = list(input())
    for k in range(len(line)):
        if line[k] == '#':
            grid[t + 1] += [-1]
        else:
            grid[t + 1] += [0]
    grid[t + 1] += [-1]
grid.append([-1 for _ in range(b + 2)])
grid[1][1] = 1
for x in range(1, a + 1):
    for y in range(1, b + 1):
        if grid[x][y] > 0:
            if grid[x + 1][y] != -1:
                grid[x + 1][y] += grid[x][y]
            if grid[x][y + 1] != -1:
                grid[x][y + 1] += grid[x][y]
print(grid[-2][-2] % (10 ** 9 + 7))
N = int(input())
a = [int(i) for i in input().split()]

li_ans = []
ans = 0

for num in (min(a), max(a)):
    for j in range(len(a)):
        ans += abs(a[j] - num) ** 2
    else:
        li_ans.appned(ans)
        ans = 0

print(min(li_ans))


### FIXED CODE ###

N = int(input())

a = [int(i) for i in input().split()]

ans = []
sum = 0

for j in range(min(a), max(a)):
    for num in a:
        sum += (num - j) ** 2
    else:
        ans.append(sum)
        sum = 0

if len(ans) == 0:
    print(0)
else:
    print(min(ans))
c = input()
if c == a or c == i or c == u or c == e or c == o:
  print('vowel')
else:
  print('consonant')

### FIXED CODE ###

c = input()
if c == 'a' or c == 'i' or c == 'u' or c == 'e' or c == 'o':
  print('vowel')
else:
  print('consonant')
P = input()
Q = input()
R = input()

a = min(P + Q, Q + R, R + P)
print(a)

### FIXED CODE ###

a = list(map(int, input().split()))
b = min(a[0] + a[1], a[1] + a[2], a[2] + a[0])
print(b)
N, K = input().split()
N = int(N)
K = int(K)

array = input().split()
for i in range(len(array)):
    array[i] = int(array[i])

now = 1

history = []
start_number = -1

for i in range(K):
    history.append(now)
    now = array[now - 1]
    if(now in history):
        start_number = now
        break

if not(start_number == -1):
    start_ind = history.index(start_number)
    length = len(history) - start_ind
    mod = (K - start_ind) % length
    now = history[start_ind + mod]

print(now)


### FIXED CODE ###

S = input()
T = input()

flag = True
for i in range(len(S)):
    if(S[i] != T[i]):
        flag = False

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

N = int(input())

list = []
for i in range(0, N):
    x, y, h = [int(x) for x in input().split()]
    list.append((x, y, h))

for X in range(0, 101):
    for Y in range(0, 101):
        b = True
        H = 0
        for Cx, Cy, Ch in list:
            if Ch != 0:
                H = Ch + abs(X - Cx) + abs(Y - Cy)
        for Cx, Cy, Ch in list:
            h = max(H - abs(X - Cx) - abs(Y - Cy), 0)
            if Ch != h:
                b = False
        if b == True:
            print(X, Y, H)
            sys.exit(0)


### FIXED CODE ###

N = int(input())
if N==1:
    print('Hello World')
else:
    A = int(input())
    B = int(input())
    print(A + B)
n = int(input())
s = list(input().split())
a=[]
w=[]
t=[]
r=[]

for i in range (n):
  if s[i] == "AC":
    a.append(s[i])
  elif s[i]== "WA":
    w.append(s[i])
  elif s[i]== "TLE":
    t.append(s[i])
  else:
    r.append(s[i])
  
print("AC × ",sum(a))
print("WA × ",sum(w))
print("TLE × ",sum(t))
print("RE × ",sum(r))
  

### FIXED CODE ###

n = int(input())
s = list(input() for i in range(n))
  
print("AC x ",s.count("AC"))
print("WA x ",s.count("WA"))
print("TLE x ",s.count("TLE"))
print("RE x ",s.count("RE"))
N,K=map(int,input().split())
A=list(map(int,input().split()))
MOD=10**9+7
p=[]
n=[]
for i in range(N):
    if A[i]<0:
        n.append(A[i])
    else:
        p.append(A[i])
p.sort(reverse=True)
n.sort()
numplus=len(p)
if numplus==0:
    ans=1
    for i in range(1,K+1):
        ans=(ans*n[i*(-1)])%MOD
elif N==K:
    ans=1
    for i in range(N):
        ans=(ans*A[i])%MOD
else:
    if numplus>=K:
        x=numplus
    else:
        if (K-numplus)%2==1:
            x=numplus-1
        else:
            x=numplus
    ans=1
    for i in range(x):
        ans=(ans*p[i])%MOD
    for i in range(K-x):
        ans=(ans*n[i])%MOD
    temp=ans
    bai=1
    while x>1:
        if len(n)<(K-x+2):
            break
        bai*=(n[K-x]*n[K-x+1])/(p[x-1]*p[x-2])
        temp=(temp*n[K-x]*n[K-x+1])%MOD
        temp=(temp*pow(p[x-1]*p[x-2],MOD-2,MOD))%MOD
        if bai>1:
            ans=temp
            bai=1
        x-=2
print(ans)

### FIXED CODE ###

N,K=map(int,input().split())
A=list(map(int,input().split()))
MOD=10**9+7
p=[]
n=[]
for i in range(N):
    if A[i]<=0:
        n.append(A[i])
    else:
        p.append(A[i])
p.sort(reverse=True)
n.sort()
numplus=len(p)
if numplus==0:
    ans=1
    if K%2==1:
        for i in range(1,K+1):
            ans=(ans*n[i*(-1)])%MOD
    else:
        for i in range(K):
            ans=(ans*n[i])%MOD
elif N==K:
    ans=1
    for i in range(N):
        ans=(ans*A[i])%MOD
else:
    if numplus>=K:
        x=K
        if 0 in p:
            zero=p.index(0)
            len(p)-zero-1
    else:
        if (K-numplus)%2==1:
            x=numplus-1
        else:
            x=numplus
    ans=1
    for i in range(x):
        ans=(ans*p[i])%MOD
    for i in range(K-x):
        ans=(ans*n[i])%MOD
    temp=ans
    while x>1:
        if len(n)<(K-x+2):
            break
        if n[K-x]*n[K-x+1]<p[x-1]*p[x-2]:
            break
        temp=(temp*n[K-x]*n[K-x+1])%MOD
        temp=(temp*pow(p[x-1]*p[x-2],MOD-2,MOD))%MOD
        ans=temp
        x-=2
print(ans)
from sys import stdin
s = "".join(sorted(list(stdin.readline().rstrip())))
t = "".join(reversed((sorted(list(stdin.readline().rstrip()))))
if s < t:
    print("Yes")
else:
    print("No")

### FIXED CODE ###

from sys import stdin
s = "".join(sorted(list(stdin.readline().rstrip())))
t = "".join(reversed((sorted(list(stdin.readline().rstrip())))))
if s < t:
    print("Yes")
else:
    print("No")
N, M, C = map(int, input().split())
B = [int(_) for _ in input().split()]
for i in range(1, N + 1):
    Ai = [int(_) for _ in input().split()]
right = 0
for i in range(1,N + 1):
    for j in range(M):
        a = 0
        a += Ai[j] * B[j]
    if a + C > 0:
        right += 1
print(right)

### FIXED CODE ###

H, W = map(int, input().split())
h, w = map(int, input().split())
ans = H * W - h * W - w * H + h * w
print(ans)
def knapsack(nums, KLeap):
    n = len(nums)
    if n == 0 or n == 1:
        return 0

    if n == 2:
        return abs(nums[0] - nums[1])

    # dp[i] is min cost when reaching stone i
    dp = [0] * n
    for i in range(1, KLeap):
        dp[i] = abs(nums[0] - nums[i])

    for i in range(K+1, n):
        dp[i] = min([dp[i - k] + abs(nums[i - k] - nums[i]) for k in range(1, KLeap)])

    return dp[-1]


if __name__ == "__main__":
    _, K = [int(x) for x in input().split()]
    nums = [int(x) for x in input().split()]
    print(knapsack(nums, K))


### FIXED CODE ###

def knapsack(nums, k):
    n = len(nums)

    # dp[i] is min cost when reaching stone i
    dp = [float('Inf')] * n
    dp[0] = 0
    for i in range(1, n):
        dp[i] = min([
            dp[i-j] + abs(nums[i] - nums[i-j])
            for j in range(1, k+1) if i - j >= 0]
        )
    return dp[-1]


if __name__ == "__main__":
    _, k = [int(x) for x in input().split()]
    nums = [int(x) for x in input().split()]
    print(knapsack(nums, k))
N = int(input())
L = list(map(int,input().split("" )))
S = set(L)
X = []

if len(S) < 3:
  print(0)
else:
  for i in S:
    L.count(i) > 1:
      X.append(L.count(i))
  ans = len(S)*len(S-1)*len(S-2)
  for i in X:
    ans *= i
  print(ans)

### FIXED CODE ###

n = int(input())
l = list(map(int,input().split(" ")))
ans = 0

for i in range(n):
  for j in range(n):
    for k in range(n):
      if l[i] < l[j] & l[j] < l[k]:
        if l[i] != l[j] != l[k]:
          if l[i] + l[j] + l[k] > max(l[i],l[j],l[k])*2:
            ans += 1

print(ans)
import sys
from collections import deque
sys.setrecursionlimit(10 ** 5)
input = sys.stdin.readline
N = int(input())
p = [deque([]) for _ in range(N)]

for i in range(N-1):
    a, b, c = [int(x) for x in input().strip().split()]
    p[a-1].append((b, c))
    p[b-1].append((a, c))

Q, K = [int(x) for x in input().strip().split()]

c = [-1] * N
f = [False] * N

def search(cp, cost):
    f[cp-1] = True
    for np, cos in p[cp-1]:
        if f[np-1]:
            continue
        c[np-1] = cost + cos
        f[np-1] = True
        search(np, cost + cos)

search(K, 0)
for q in range(Q):
    x, y = [int(x) for x in input().strip().split()]
    print(c[x-1]+c[y-1])

### FIXED CODE ###

import sys
from collections import deque
sys.setrecursionlimit(10 ** 6)
input = sys.stdin.readline
n = int(input())
m = {}
np = [deque([]) for _ in range(n)]
for _ in range(n-1):
    a, b, c = [int(x) for x in input().strip().split()]
    m[(a, b)] = c
    m[(b, a)] = c
    np[a-1].append(b)
    np[b-1].append(a)

q, k = [int(x) for x in input().strip().split()]
master = [-1 for _ in range(n)]
master[k-1] = 0

def dfs(cur, pre, master):
    #print('cur = {}, pre = {}'.format(cur, pre))
    for p in np[cur-1]:
        if p == pre:
            continue
        master[p-1] = master[cur-1] + m[(cur, p)]
        dfs(p, cur, master)

dfs(k, -1, master)

for _ in range(q):
    x, y = [int(x) for x in input().strip().split()]
    print(master[x-1] + master[y-1])
import numpy as np
n = int(input())
xyhl = [list(map(int, input().split())) for _ in range(n)]

tmaps = np.zeros((101, 101, n), dtype="int64")
for d in range(n) :
    for i in range(101) :
        for j in range(101) :
            x, y, h = xyhl[d]
            tmaps[i, j, d] = abs(x-i)+abs(y-j)+h

dmaps = np.diff(tmaps, axis=2)
xmap = np.logical_or.reduce(dmaps, axis=2)
place = np.where(np.logical_not(xmap))
cx, cy = place[0][0], place[1][0]
h = tmaps[cx, cy, 0]
print("{} {} {}".format(cx, cy, h))

### FIXED CODE ###

import numpy as np
n = int(input())
xyhl = [list(map(int, input().split())) for _ in range(n)]
xyhl1 = [xyh for xyh in xyhl if xyh[2] != 0]
xyhl0 = [xyh for xyh in xyhl if xyh[2] == 0]

tmaps = np.zeros((101, 101, len(xyhl1)), dtype="int64")
for d in range(len(xyhl1)) :
    for i in range(101) :
        for j in range(101) :
            x, y, h = xyhl1[d]
            tmaps[i, j, d] = abs(x-i)+abs(y-j)+h

tmap0 = np.zeros((101, 101, len(xyhl0)), dtype="int64")
for d in range(len(xyhl0)) :
    for i in range(101) :
        for j in range(101) :
            x, y, h = xyhl0[d]
            tmap0[i, j, d] = abs(x-i)+abs(y-j)+h

dmaps = np.diff(tmaps, axis=2)
xmap = np.logical_or.reduce(dmaps, axis=2)
place = np.where(np.logical_not(xmap))

for i, j in zip(place[0],place[1]) :
    for t in tmap0[i, j, :].flat :
        if tmaps[i, j, 0] > t :
            break
    else :
        ans = [i, j, tmaps[i, j, 0]]

print("{} {} {}".format(ans[0], ans[1], ans[2]))
_ = input()
S = input()
print(len(S.split("ABC") - 1)

### FIXED CODE ###

_ = input()
S = input()
print(len(S.split("ABC")) - 1)
da = list(map(int,input().split()))
k = [[0]*2]*10000
i = 0
su = 0
j = 0
while da[0] != 0 and da[1] != 0:

	i = 0
	su = 0
	j = 0
	for i in range(da[0]):
		k[i][0],k[i][1] = map(int,input().split())
		su += k[i][0] * k[i][1]

	sorted(k)
	while da[1] != 0:
		if da[1] > k[j][0]:
			su -= k[j][0]* k[j][1]
			da[1] -= k[j][0]
			j += 1

		else:
			su -= da[1] * k[j][1]
			da[1] = 0
			j += 1

	print(su)

	da = list(map(int,input().split()))
	k = [[0]*2]*10000



### FIXED CODE ###

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

k = [[0 for i in range(2)]for j in range(10001)]
i = 0
su = 0
j = 0

while da[0] + da[1] != 0:
	i = 0
	su = 0
	j = 0
	for i in range(da[0]):
		k[i][0],k[i][1] = map(int,input().split())


	k = sorted(k,key = lambda x: x[1],reverse = True)

	while j != i + 1:
		if da[1] > k[j][0]:
			da[1] -= k[j][0]
			j += 1
		elif da[1] <= k[j][0] and da[1] > 0:
			su += (k[j][0] - da[1]) * k[j][1]
			da[1] = 0
			j += 1
		else:
			su += k[j][0] * k[j][1]
			j += 1

	print(su)

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

	k = [[0 for i in range(2)]for j in range(10001)]
h,w,d=map(int,input().split())
a = [list(map(int,input().split())) for _ in range(h)]

dx = [0 for _ in range(h*w+5)]
dy = [0 for _ in range(h*w+5)]

for i in range(h):
    for j in range(w):
        dx[a[i][j]] = i
        dy[a[i][j]] = j

dfromd = [[0 for _ in range((h*w+5)//d)] for _ in range(h*w+5)]

for i in range(h*w-d+3):
    for j in range(1,(h*w+5)//d):
        if i+d*j <= h*w+3:
            dfromd[i][j] = dfromd[i][j-1] + abs(dx[i+d*j]-dx[i+d*(j-1)])+abs(dy[i+d*j]-dy[i+d*(j-1)])

q = int(input())
for _ in range(q):
    l,r=map(int,input().split())
    print(dfromd[l][(r-l)//d])

### FIXED CODE ###

h,w,d=map(int,input().split())
a = [list(map(int,input().split())) for _ in range(h)]

dx = [0 for _ in range(h*w+5)]
dy = [0 for _ in range(h*w+5)]

for i in range(h):
    for j in range(w):
        dx[a[i][j]] = i
        dy[a[i][j]] = j

dfromd = [0 for _ in range(h*w+1)]

for i in range(d+1,h*w+1):
        dfromd[i] = dfromd[i-d]+abs(dx[i-d]-dx[i])+abs(dy[i-d]-dy[i])

q = int(input())
for _ in range(q):
    l,r=map(int,input().split())
    print(dfromd[r]-dfromd[l])
import numpy as np


def c(A):
    N = len(A)
    B = np.zeros_like(A)
    for i, a in enumerate(A):
        l = max(0, i - a)
        r = min(N - 1, i + a)
        B[l] += 1
        if r + 1 < N:
            B[r + 1] -= 1

    B = np.cumsum(B)
    return B


N, K = map(int, input().split())
A = np.array(list(map(int, input().split())))


K = min(K, 50)
for _ in range(K):
    A = c(A)

print(' '.join(A.astype(str)))

### FIXED CODE ###

import sys
import numpy as np
from numba import njit


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

@njit('(i8[::1],)', cache=True)
def c(A):
    N = len(A)
    B = np.zeros_like(A)
    for i, a in enumerate(A):
        l = max(0, i - a)
        r = min(N - 1, i + a)
        B[l] += 1
        if r + 1 < N:
            B[r + 1] -= 1

    B = np.cumsum(B)
    return B


def main():
    N, K = map(int, readline().split())
    A = np.array(readline().split(), np.int64)


    K = min(K, 50)
    for _ in range(K):
        A = c(A)

    print(' '.join(A.astype(str)))


if __name__ == '__main__':
    main()
N = int(input())
A = list(map(int,input().split()))

DP = [[-10**9 for i in range((N+1)//2)] for i in range(N)]

DP[0][0] = A[0]
for i in range(1,N):
    DP[i][0] = max(DP[i-1][0],A[i])

for i in range(1,N//2-1):
    DP[2*i][i] = DP[2*(i-1)][i-1] + A[2*i]

for i in range(3,N):
    for j in range(i//2-1,(i+1)//2):
        DP[i][j] = max(DP[i-1][j],DP[i-2][j-1]+A[i])

print(DP[N-1][N//2-1])


### FIXED CODE ###

N = input()
if '7' in N:
    print('Yes')
else:
    print('No')
n, m = map(int, input().split())
A = list(map(int, input().split()))
sorted_A = list(reversed(sorted(A)))
print("No" if sorted_A[m] < sum(A)/(4*m) else "Yes")


### FIXED CODE ###

n, m = map(int, input().split())
A = list(map(int, input().split()))
sorted_A = list(reversed(sorted(A)))
print("No" if sorted_A[m-1] < sum(A)/(4*m) else "Yes")
from collections import defaultdict
def main():
    #入力
    N, Q = (int(_) for _ in input().split())
    edge = [[int(_) for _ in input().split()] for __ in range(N-1)]
    query = [[int(_) for _ in input().split()] for __ in range(Q)]

    tree = defaultdict(list)
    for a, b in edge:
        tree[a].append(b)
        tree[b].append(a)

    cc = [0] * (N+1)
    seen = [False] * (N+1)

    for p, x in query:
        cc[p] += x

    def dfs(x):
        for p in tree[x]:
            if seen[p] == False:
                seen[p] = True
                cc[p] += cc[x]
                dfs(p)
        return

    seen[1] = True
    dfs(1)

    print(*cc[1:])
    return

if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
input = sys.stdin.readline #for input speed
sys.setrecursionlimit(10**6) #for deep recursion
n, q = map(int, input().split())

tree_index = [[] for _ in range(n)]
for i in range(n-1):
  a,b = map(int, input().split())
  a -= 1
  b -= 1
  tree_index[a].append(b) # a<bとは限らないため、双方向にする
  tree_index[b].append(a)
ans = [0] * n
for i in range(q):
  p, x = map(int, input().split())
  ans[p-1] += x
def dfs(cur, par):
    for chl in tree_index[cur]:
      if chl == par: #parentとchildが等しい時はスキップ
        continue
      ans[chl] += ans[cur] 
      dfs(chl, cur)
dfs(0, -1)
print(*ans)
n=int(input())
h=list(map(int,input.split()))
hm=max(h)
t=1
for i in range(hm,-1,-1):
    for j in range(n):
        if h[j]=i:
            ans+=t
            t=0
        else:
            t=1

print(ans)


### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))
hm=max(h)

ans=0
for i in range(hm,0,-1):
    t=1
    for j in range(n):
        if h[j]>=i:
            ans+=t
            t=0
        else:
            t=1

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

if K%2==0:
    d1=N//(N//2)
    d2=N//K
    ans=d2**3+(d1-d2)**3
else:
    d=N//K
    ans = d**3
print(ans)
    

### FIXED CODE ###

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

if K%2==0:
    d1=N//(K//2)
    d2=N//K
    ans=d2**3+(d1-d2)**3
else:
    d=N//K
    ans = d**3

print(ans)
a, b = map(int, input().split())
c = 1
while(True):
    if(int(c*0.08)==a and int(c*0.1)==b):
        print(c)
        exit()
    c+=1
    if(c=100000):
        print(-1)
        exit()

### FIXED CODE ###

a, b = map(int, input().split())
c = 1
while(True):
    if(int(c*0.08)==a and int(c*0.1)==b):
        print(c)
        exit()
    c+=1
    if(c==100000):
        print(-1)
        exit()
import math
N,M = map(int,input().split())
S = input()
T = input()

flag = True
for n in range(N):
    if (M*n)%N==0:
        m = (M*n)//N
        flag = m<M
        flag = S[n]==T[m]
        if not flag:
            break

if flag:
    print(N*M//math.gcd(N,M))
else:
    print(-1)


### FIXED CODE ###

def gcd(a, b):
	while b:
		a, b = b, a % b
	return a
    
N,M = map(int,input().split())
s = input()
t = input()
g = gcd(N,M)
l = N*M//g

n = N//g
m = M//g

ans = l

for i in range(g):
    if s[i*n]!=t[i*m]:
        ans = -1
        break
print(ans)
a = input().split("\n")[1]
print(a.count("ABC"))

### FIXED CODE ###

a = input()
a = input()
print(a.count("ABC"))
def s(way):
    global w
    w2 =[]
    for i in way:

        for j in w[i]:
            if c[j] == 0:

                w2.append(i)
            if not w2 ==[]:
                s(w2)
        c[i] = 1

n,m = map(int,input().split())
a = [0 for i in range(m)]
b = [0 for i in range(m)]
w = [[] for i in range(n)]
c = [0 for i in range(n)]
for i in range(m):
    a[i],b[i] = map(int,input().split())
    w[a[i]-1].append(b[i]-1)
    w[b[i]-1].append(a[i]-1)
ans =-1
for i in range(n):
    if c[i] == 0:
        c[i] = 1
        ans += 1
        s(w[i])

print(ans)

### FIXED CODE ###


from collections import deque

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

w = [[] for i in range(n)]
c = [0 for i in range(n)]
for i in range(m):
    a,b = map(int,input().split())
    w[a-1].append(b-1)
    w[b-1].append(a-1)
ans =-1
for i in range(n):
    if c[i] == 0:
        c[i] = 1
        ans += 1
        d.append(i)
        while d:
            x = d.pop()
            for i in w[x]:
                if c[i] == 0:
                    c[i] = 1
                    d.append(i)

print(ans)
s = input()
_ = int(input())
print(s[1]) if s[0] == "1" else print(s[0])

### FIXED CODE ###

s = input()
k = int(input())
if k == 1: print(s[0])
else:
    for i in range(k):
        if s[i] != "1":
            print(s[i])
            break
        else:
            if i == k - 1:
                print(s[i])
                break
N = int(input())
if N == 1:
    print('Hello World')
else:
    A, B = map(int, input().split())
    print(A+B)


### FIXED CODE ###

N = int(input())
if N == 1:
    print('Hello World')
else:
    print(int(input()) + int(input()))
import random
N = int(input())
for i in range(N):
    a = int(input())

b = random.randint(0,1)
if b == 1:
    print("first")
else:
    print("second")


### FIXED CODE ###

a = int(input())
b = str(a)
print(b.count("2"))
d,n=int(int,input().split())
print(100**d*n)

### FIXED CODE ###

d,n=map(int,input().split())
print(100**d*n if n!=100 else 100**(d+1)+100**d)
import numpy as np
N = int(input())

ARR = []

for i in range(N):
    ARR.append([int(s) for s in input().split(" ")])

PRR = []

for i in range(N):
    PRR.append([int(s) for s in input().split(" ")])

def calculate(n, arr, prr):
    arr = np.array(arr)

    brr = []
    for i in range(1,2 ** 10):

        mask = np.zeros(10)
        for j in range(0, 10):
            m = i >> j & 1
            mask[9-j] = m
        s = np.count_nonzero((arr == mask) & (arr == 1),axis=1)


    return brr

result = calculate(N, ARR, PRR)
print(max(result))



### FIXED CODE ###

n = int(input())

frr = []

for i in range(n):
    frr.append([int(s) for s in input().split(" ")])

prr = []

for i in range(n):
    prr.append([int(s) for s in input().split(" ")])

# n = 2
#
# frr = [
#     [1, 1, 1, 1, 1, 0, 0, 0, 0, 0],
#     [0, 0, 0, 0, 0, 1, 1, 1, 1, 1]
# ]
#
# prr = [
#     [0, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1],
#     [0, -2, -2, -2, -2, -2, -1, -1, -1, -1, -1]
# ]


res = []
for i in range(1,2 ** 10):
    count = [0 for s in range(n)]

    mask = []
    for j in range(10):
        m =  i >> j & 1
        mask.append(m)
        if m == 1:
            for k in range(n):
                if frr[k][j] == 1:
                    count[k] = count[k] + 1

    mm = []
    for index,c in enumerate(count):
        mm.append(prr[index][c])

    res.append(sum(mm))

print(max(res))
N = int(input())
H = list(map(int, input().split()))

_count=1
max_height=H[0]

for i in range(1,N):
    if max_height <= H[i]:
        count +=1
        max_height = H[i]
print(_count)


### FIXED CODE ###

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

_count=1
max_height=H[0]

for i in range(1,N):
    if max_height <= H[i]:
        _count +=1
        max_height = H[i]
print(_count)
S = list(input())
s = len(S)
K = int(input())
A = []
j = 1

for i in range(0,s-1,1):
  if S[i] == S[i+1]:
    j += 1
  else:
    A.append(j)
    j = 1
A.append(j)

a = len(A)

b = 0
for i in range(a):
  b += i//2
  
x = b*K

if S[s-1] == S[0] and A[a-1] % 2 == 1 and A[1] % 2 == 1:
  x += K-1
  
print(x)


### FIXED CODE ###

S = list(input())
s = len(S)
K = int(input())
A = []
j = 1

for i in range(0,s-1,1):
  if S[i] == S[i+1]:
    j += 1
  else:
    A.append(j)
    j = 1
A.append(j)

a = len(A)

b = 0
for i in range(0,a,1):
  b += A[i]//2
  
x = b*K

if a == 1:
  x = (s*K)//2
elif S[s-1] == S[0] and A[a-1] % 2 == 1 and A[0] % 2 == 1:
  x += K-1

print(x)
# N：全種類数、M：今回種類数
N,M = map(int, input().split())
# 得票数
hyou = list(map(int, input().split()))

# 総得票数
total_hyou = 0
for i in hyou:
  total_hyou += i

# 得票数基準クリア数
count = 0
for j in hyou:
  if j >= 1/4*M:
    count += 1
    
# 人気商品をM個選べるかどうか
if count >= M:
  print('Yes')
else:
  print('No')

### FIXED CODE ###

# [箱A, 箱B, 箱C]
list = input().split()

# 箱Aと箱B入れ替え
temp = list[0]
list[0] = list[1]
list[1] = temp

# 箱Aと箱C入れ替え
temp = list[0]
list[0] = list[2]
list[2] = temp              
              
print(' '.join(list))