Harryxun/stf_run huggingface dataset:
import math

number = input().split(" ")
A = int(number[0])
B = int(number[1])

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(A, B))

### FIXED CODE ###

import fractions

number = input().split(" ")
A = int(number[0])
B = int(number[1])

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

print(lcm(A, B))
input_line=input().rstrip().slpit()
num1 = int(input_line[0])
num2 = int(input_line[1])

if (num1 > num2):
  print(str(num2)*num1)
elif (num1 < num2):
  print(str(num1)*num2)
elif (num1 == num2):
  print(str(num1)*num2)

### FIXED CODE ###

input_line=input().rstrip().split()
num1 = int(input_line[0])
num2 = int(input_line[1])
 
if (num1 > num2):
  print(str(num2)*num1)
elif (num1 < num2):
  print(str(num1)*num2)
elif (num1 == num2):
  print(str(num1)*num2)
n = input().split()
c = list(input()) 
c[int(n[1])] = c[int(n[1])].lower()
print("".join(c))


### FIXED CODE ###

n = input().split()
c = list(input()) 
c[int(n[1]) - 1] = c[int(n[1]) - 1].lower()
print("".join(c))
a = [list(map(int, input().split())) for i in range(3)]
 
num = int(input())
for i in range(num):
  now = int(input())
  for i in range(3):
    for j in range(3):
      if(a[i][j] == now):
        a[i][j] = 0
        
for i in range(3):
  if(a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0):
    ans = 'yes'
  if(a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0):
    ans = 'yes'
    
if(a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0):
  ans = 'yes'
if(a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0):
  ans = 'yes'

print(ans)

### FIXED CODE ###

a = [list(map(int, input().split())) for i in range(3)]
 
num = int(input())
for i in range(num):
  now = int(input())
  for i in range(3):
    for j in range(3):
      if(a[i][j] == now):
        a[i][j] = 0
ans = 'No'        
for i in range(3):
  if(a[i][0] == 0 and a[i][1] == 0 and a[i][2] == 0):
    ans = 'Yes'
  if(a[0][i] == 0 and a[1][i] == 0 and a[2][i] == 0):
    ans = 'Yes'
    
if(a[0][0] == 0 and a[1][1] == 0 and a[2][2] == 0):
  ans = 'Yes'
if(a[0][2] == 0 and a[1][1] == 0 and a[2][0] == 0):
  ans = 'Yes'

print(ans)
n=int(input())
a=list(map(int,input().split()))
sai=max(a)

if sai%2==0:
  b=sai//2
  hantei=10**9+1
  suuji=0
  for i in a:
    if abs(b-i)<hantei and i!=sai:
      hantei=abs(b-i)
      suuji=i
  print(sai,suuji)
else:
  b1=sai//2
  b2=sai//2+1
  hantei=10**9
  suuji=0
  for i in a:
    if min(abs(b1-i),abs(b2-i))<hantei:
      hantei=abs(b-i)
      suuji=i
  print(sai,suuji)

### FIXED CODE ###

n=int(input())
a=list(map(int,input().split()))
sai=max(a)

if sai%2==0:
  b=sai//2
  hantei=10**9+1
  suuji=0
  for i in a:
    if abs(b-i)<hantei and i!=sai:
      hantei=abs(b-i)
      suuji=i
  print(sai,suuji)
else:
  b1=sai//2
  b2=sai//2+1
  hantei=10**9
  suuji=0
  for i in a:
    if min(abs(b1-i),abs(b2-i))<hantei:
      hantei=min(abs(b1-i),abs(b2-i))
      suuji=i
  print(sai,suuji)
import math
inputs = input().split()
A, B, H, M = int(inputs[0]), int(inputs[1]), int(inputs[2]), int(inputs[3])
num_diff = H*5+M/12 - M

ans = math.sqrt(A**2 + B**2 - 2 * A * B * math.cos(2 * math.pi( num_diff / 60 ))

print(ans)

### FIXED CODE ###

import math
inputs = input().split()
A, B, H, M = int(inputs[0]), int(inputs[1]), int(inputs[2]), int(inputs[3])
num_diff = H*5+M/12 - M

ans = math.sqrt(A**2 + B**2 - 2 * A * B * math.cos(2 * math.pi * ( num_diff / 60 )))
print(ans)
s = str(input())
t = str(input())
s_l =[]
for i in range(len(s)):
    s_l.append(s[i])

a = len(s) - len(t)

while a >= 0:
    insert = False
    count = 0
    for i in range(0, len(t)):
        if s[a + i] == "?" or s[a + i] == t[i]:
            count += 1
    if count == len(t):
        for i in range(len(t)):
                s_l[a+i] = t[i]
        insert = True
        break
    i -= 1

f = ""

if insert:
    for i in range(len(s)):
        if s[i] == "?":
            f += "a"
        else:
            f += s_l[i]
    print(f)
else:
    print("UNRESTORABLE")

### FIXED CODE ###

s = str(input())
t = str(input())
s_l =[]
for i in range(len(s)):
    s_l.append(s[i])

if len(s) < len(t):
    print("UNRESTORABLE")
    exit()

a = len(s) - len(t)

while a >= 0:
    insert = False
    string = True
    i = 0
    while i < len(t):
        if s[a + i] != "?" and s[a + i] != t[i]:
            string = False
            break
        i += 1
        
    if string == True:
        for i in range(len(t)):
                s_l[a+i] = t[i]
        insert = True
        break
    a -= 1

f = ""
if insert == True:
    for i in range(len(s)):
        if s_l[i] == "?":
            f += "a"
        else:
            f += s_l[i]
    print(f)
else:
    print("UNRESTORABLE")
a, b, k = map(int, input().split())

def cookie(t, s, p):
        if t > 0:
            t = t - 1
        elif s > 0:
            s = s - 1
        else:
            pass
        p -= 1
        if p > 0:
            cookie(t, s, p)
        return t, s
    
res = cookie(a, b, k)
print(res)

### FIXED CODE ###

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

if a > k:
    print(a - k, b)
else:
    print(0, max(0, a + b - k))
N,D = map(int,input().split())
import numpy as np
xlist = [list(map(int,input().split())) for i in range(n)]
xarray = np.array(xlist)
ans = 0
for i in range(n):
  for j in range(i+1,n):
    if np.linalg.norm(xarray[i]-xarray[j])==int(np.linalg.norm(xarray[i]-xarray[j])):
      ans+=1
print(ans)

### FIXED CODE ###

n,d = map(int,input().split())
import numpy as np
xlist = [list(map(int,input().split())) for i in range(n)]
xarray = np.array(xlist)
ans = 0
for i in range(n):
  for j in range(i+1,n):
    if np.linalg.norm(xarray[i]-xarray[j])==int(np.linalg.norm(xarray[i]-xarray[j])):
      ans+=1
print(ans)
a,b =map(int,input().split())

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

print(lcm(a, b))

### FIXED CODE ###

import fractions

def lcm(x, y):
    return (x * y) // fractions.gcd(x, y)

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

print(lcm(a, b))
n=int(input())
a=map(int, input().split())
print(min(a), max(a), sum(a))

### FIXED CODE ###

n=int(input())
a=list(map(int, input().rstrip().split()))
print(min(a), max(a), sum(a))
import sys;input=sys.stdin.readline
from bisect import*

n,q=map(int,input().split())
event=[]
stopped=set([-1])

def doevent(l):
    global stopped
    if l[1]==1:
        if stopped=={-1}:
            stopped=set()
        stopped.add(l[2])
    elif l[1]==-1:
        stopped.remove(l[2])
        if len(stopped)==0:
            stopped={-1}
            
for i in range(n):
    s,t,x=map(int,input().split())
    event.append((s-x,1,x))
    event.append((t-x,-1,x))
event.append((-float("inf"),"x","x"))
event.append((float("inf"),"x","x"))
event.sort(key=lambda x:x[0])
eventtime=[i[0]for i in event]
#print(eventtime)
query=[bisect_right(eventtime,int(input()))-1 for i in range(q)]+[float("inf")]
#print(query)
c=0
#print(event)
for i in range(2*n+1):
    doevent(event[i])
    while i==query[c]:
        print(min(stopped))
        c+=1

### FIXED CODE ###

import sys;input=sys.stdin.readline

n,q=map(int, input().split())
event=[]
for _ in range(n):
    s,t,x=map(int,input().split())
    event.append((s-x-0.5,1,x))
    event.append((t-x-0.5,-1,x))
for i in range(q):
    event.append((int(input()),0,i))
    
event.sort()
is_stop=False
stop=set()
minstop=float('inf')
ans=[-1]*q
for t,e,x in event:
    if e > 0:
        stop.add(x)
        if x<minstop:
            minstop=x
            is_stop=True
    elif e<0:
        stop.remove(x)
        if minstop==x:
            is_stop=False
    elif len(stop)>0:
        if not is_stop:
             minstop=min(stop)
             is_stop=True
        ans[x]=minstop
        
print('\n'.join(map(str, ans)))
import heapq
 
_x, _y, _z, k = map(int, input().split())
aa = list(reversed(sorted(map(int, input().split()))))
bb = list(reversed(sorted(map(int, input().split()))))
cc = list(reversed(sorted(map(int, input().split()))))

ab=[]
for i in range(_x):
  for j in range(_y):
    ab.append(aa[i]+bb[j])

ab.sort()
hq=[]
for z in range(_z):
  for l in range(_x*_y):
    temp = cc[z] + ab[l] 
    if len(hq) < k:
      heapq.heappush(hq,temp)
    else:
      heapq.heapreplace[hq,temp]
hq.sort()
for i in range(k):
  print(hq[k-1-i])

### FIXED CODE ###

import heapq
 
_x, _y, _z, k = map(int, input().split())
aa = list(reversed(sorted(map(int, input().split()))))
bb = list(reversed(sorted(map(int, input().split()))))
cc = list(reversed(sorted(map(int, input().split()))))
 
ar = []
history = set()
 
 
def push(x, y, z):
    if (x, y, z) in history:
        pass
    else:
        v = aa[x] + bb[y] + cc[z]
        heapq.heappush(ar, (-v, x, y, z))
        history.add((x, y, z))
 
 
def pop():
    (v, x, y, z) = heapq.heappop(ar)
    return (-v, x, y, z)
 
 
push(0, 0, 0)
for _ in range(k):
    (total, x, y, z) = pop()
    print(total)
    if x + 1 < len(aa):
        push(x + 1, y, z)
    if y + 1 < len(bb):
        push(x, y + 1, z)
    if z + 1 < len(cc):
        push(x, y, z + 1)
import numpy as np
import math
import scipy
import itertools
import fractions
import functools

def gcd(nums):
    return functools.reduce(euclid, nums)

def solve():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    g = gcd(a)
    if k <= max(a) and k % g == 0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")
    return 0

if __name__ == "__main__":
    solve()



### FIXED CODE ###

import numpy as np
import functools
import math
import scipy
import fractions
import itertools

def solve():
    n, k = map(int, input().split())
    a = list(map(int, input().split()))
    g = a[0]
    for i in range(1, n):
        g = fractions.gcd(g, a[i])
    if k <= max(a) and k % g == 0:
        print("POSSIBLE")
    else:
        print("IMPOSSIBLE")
    return 0

if __name__ == "__main__":
    solve()
N = int(input())
L = list(map(int,input().split()))
L = sorted(L,reverse=True)

flg = 1
for i in range(N) :
    if i % 2 == 0 :
        if L[i] != N-i-1
            flg = 0
            break
    else :
        if L[i] != l
        flg = 0
        break
if flg == 0 :
    ans = 0
else :
    ans = 2**(N//2) % (10**9+7)
print(ans)


### FIXED CODE ###

N = int(input())
L = list(map(int,input().split()))
M = sorted(L,reverse=True)
flag = 1
for i in range(N) :
    if i % 2 == 0 :
        l = M[i]
        if l != (N-i-1) :
            flag = 0
            break
    else :
        if M[i] != l :
            flag = 0
            break
if flag == 0 :
    ans = 0
else :
    ans = (2**(N//2)) % (10**9+7)
print(ans)
n, m = map(int, input().split())


def fib(num):
    a, b = 0, 1
    for i in range(num):
        a, b = b, a + b
    return b


cnt = [fib(i) for i in range(1, n)]
if m == 0:
    print(cnt[n])
    exit()

l = [int(input()) for _ in range(m)]
l_diff = [l[0] - 1]
for i in range(1, m):
    l_diff.append(l[i] - l[i - 1] - 2)
l_diff.append(n - l[m - 1] - 1)

for k in range(1, m):
    if l[k] - l[k - 1] == 1:
        print(0)
        exit()


total = 1
for j in l_diff:
    if j == 0:
        pass
    else:
        total *= cnt[j - 1]

print(total % 1000000007)



### FIXED CODE ###

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

cnt = [1, 2]

for i in range(1, n - 1):
    cnt.append(cnt[i] + cnt[i - 1])

if m == 0:
    print(cnt[n - 1] % 1000000007)
    exit()

l = [int(input()) for _ in range(m)]

l_diff = [l[0] - 1]
for i in range(1, m):
    l_diff.append(l[i] - l[i - 1] - 2)
l_diff.append(n - l[m - 1] - 1)

for k in range(1, m):
    if l[k] - l[k - 1] == 1:
        print(0)
        exit()


total = 1
for j in l_diff:
    if j == 0:
        pass
    else:
        total *= cnt[j - 1]

print(total % 1000000007)
a,b=map(int(input()));print([a-1,a][b>=a])

### FIXED CODE ###

a,b=map(int,input().split());print([a-1,a][b>=a])
import math
n = int(input())
a = list(map(int, input().split()))

ans = a[0]
for x in a:
  ans = math.gcd(ans, x)
print(ans)

### FIXED CODE ###

import fractions
n = int(input())
a = list(map(int, input().split()))

ans = a[0]
for x in a:
  ans = fractions.gcd(ans, x)
print(ans)
n = int(input())

n_max = 1
cnt_max = 0
for i in range(1, n + 1):
  cnt = 0
  a = i
  while(a % 2 == 0)
    a %= 2
    cnt += 1
  if cnt > cnt_max:
    cnt_max = cnt
    n_max = i

print(n_max)

### FIXED CODE ###

n = int(input())
 
n_max = 1
cnt_max = 0
for i in range(1, n + 1):
  cnt = 0
  a = i
  while(a % 2 == 0):
    a /= 2
    cnt += 1
  if cnt > cnt_max:
    cnt_max = cnt
    n_max = i
 
print(n_max)
a , op , b = input().split()
a = int(a)
b = int(b) 
if op == "?":
  break
elif op == "+":
  print(a+b)
elif op == "-":
  print(a-b) 
elif op == "*":
  print(a*b)
elif op == "/":
  print(a//b)


### FIXED CODE ###

while True:
  a , op , b = map(str,input().split())
  a = int(a)
  b = int(b) 
  if op == "?":
    break
  elif op == "+":
    print(a+b)
  elif op == "-":
    print(a-b) 
  elif op == "*":
    print(a*b)
  elif op == "/":
    print(a//b)
n = int(input())
buttons = [0]
target_index = 0
for i in range(n):
    num = int(input())
    buttons.append(num)

count = 0
next_index = 2
while count < n:
    if next_index < 1 or len(buttons) - 1 <= next_index:
        count = -1
        break

    prev_index = buttons.index(next_index)
    count += 1
    if prev_index == 1:
        break
    else:
        next_index = prev_index

print(count if count < n else -1)


### FIXED CODE ###

n = int(input())
buttons = [0]
target_index = 0
for _ in range(n):
    buttons.append(int(input()))

count = 0
prev_index = 1
while count < n:
    if prev_index < 1 or len(buttons) <= prev_index:
        count = -1
        break

    next_index = buttons[prev_index]
    count += 1
    if next_index == 2:
        break
    else:
        prev_index = next_index

print(count if count < n else -1)
n = int(input())
s = str(input())

max = 0
for i in n:
  max1 = count(s[n])
  if (max < max1):
    max = max1:

print(max)

### FIXED CODE ###

n = int(input())
s = str(input())

max = 0
for i in range(n):
  x = set(s[:i]) & set(s[i:])
  if max < len(x):
    max = len(x)
print(max)
K = int(input())
A,B = map(int,input().split())

n = range(A,B+1)
ind = range(B-A)
for i in n:
    list.append(i)
counter = 0

for i in ind:
    if list[i]%K == 0:
        counter += 1
    else:
        counter += 0
if counter > 0:
    print("OK")
else:
    print("NG")
        
    

### FIXED CODE ###

K = int(input())
A,B = map(int,input().split())
list = []
n = range(A,B+1)
ind = range(B-A+1)
for i in n:
    list.append(i)
counter = 0

for i in ind:
    if list[i] % K == 0:
        counter += 1
    else:
        counter += 0
if counter >= 1:
    print("OK")
else:
    print("NG")
n, m = map(int, input().split())
a = list(map(int, input().split()))
bc = [list(map(int, input().split())) for _ in range(m)]

bc.sort(key=lambda x: x[1], reverse=True)
d = []
i = 0

while len(d) <= n and i < len(bc):
    d += ([bc[i][1]] * bc[i][0])
    i += 1

if len(d) > n:
    d = d[:n]

a += d
a.sort(reverse=True)

print(sum(a[:n]))


### FIXED CODE ###

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

if a >= 13:
    print(b)
elif a >= 6:
    print(b//2)
else:
    print(0)
s=input()
pos=0
cnt=0
flag=False
check='keyence'
for i in range(len(s)):
  if s[i]==check[pos]:
    pos+=1
    flag=True
  else:
    if flag==True:
      cnt+=1
      flag=False
if pos==7 and cnt<=1:
  print('YES')
else:
  print('NO')


### FIXED CODE ###

s=input()
flag=1
if s=='keyence':
  flag=0
for i in range(len(s)):
  for j in range(1,len(s)-i+1):
    if (s[:i]+s[i+j:])=='keyence':
      flag*=0
if flag==0:
  print('YES')
else:
  print('NO')
import sys
from math import *
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
li = na()
mst = li[0]
for i in range(1, n):
    if li[i] >= mst:
        mst = li[i]
    elif li[i] != mst - 1:
        print("No")
        exit(1)
print("Yes")


### FIXED CODE ###

import sys
from math import *
stdin = sys.stdin

ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
ns = lambda: stdin.readline().rstrip()  # ignore trailing spaces

n = ni()
li = na()
mst = li[0]
flag = "Yes"
for i in range(n):
    if li[i] >= mst:
        mst = li[i]
    elif li[i] != mst - 1:
        flag = "No"
        break
print(flag)
a,b=input()
ab=int("a"+"b")
ans=0
for i in range(350):
	if int(ab**(1/2))==i:
      print("Yes")
      ans+=1
      quit()
if ans==0:
  print("No")
    

### FIXED CODE ###

a,b=input().split()
ab=int(a+b)
ans=0
for i in range(350):
	if ab**(1/2)==i:
	    print("Yes")
	    ans+=1
	    quit()
if ans==0:
  print("No")
A, B, C = map(int, input())
print('Yes' if A+2*B >= C else 'No')

### FIXED CODE ###

A, B, C = map(int, input().split())
print('Yes' if A+B >= C else 'No')
import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]
    
    if a[1] <= a[0]:
        print(1)
    else:
        print(2 + (a[1]-1[0])//(a[1] -1) )


### FIXED CODE ###

import sys
import copy
import math
import bisect
import pprint
import bisect
from functools import reduce
from copy import deepcopy
from collections import deque

def lcm(x, y):
    return (x * y) // math.gcd(x, y)

if __name__ == '__main__':
    a = [int(i) for i in input().split()]

    for i in range(1,100):
        count = 0
        
        if a[1] ==1:
            print(0)
            break
            
        if i > 1:
            count = a[0] + (a[0]-1)*(i-1)
        else:
            count = a[0]

        if count >= a[1]:
            print(i)
            break
apple, frag = map(int, input().split())
     
    pie = ((apple*3) + frag) / 2
     
    print(pie)

### FIXED CODE ###

apple, frag = map(int, input().split())
         
pie = ((apple*3) + frag) / 2
         
print(int(pie))
# https://beta.atcoder.jp/contests/abc101/tasks/abc101_b
# B - Digit Sums

# B_Digit_Sums.py

N = int(input())
str_N = str(N)

S_N = 0
for i in range(str_N):
    S_N += ( N % (10 ** (i+1)) ) // ( N // (10 ** i) )
print(S_N)


### FIXED CODE ###

# https://beta.atcoder.jp/contests/abc101/tasks/abc101_b
# B - Digit Sums

# B_Digit_Sums.py

N = int(input())
str_N = str(N)

S_N = 0
for i in range(len(str_N)):
    S_N += ( N % (10 ** (i+1)) ) // (10 ** i)

if N % S_N == 0:
    print('Yes')
else:
    print('No')
import sys
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()

n = ni()
a = na()
b = []
for i in range(n):
    b.append((a[i],i))

b.sort(reverse=True)

ans = 0

def f(left,right,k,c):
    if k == n:
        return c
    i,j = b[k]
    x = j-left
    y = right-j
    return max(f(left+1,right,k+1,c+x*i), f(left,right-1,k+1,c+y*i))

ans = f(0,n-1,0,0)

print(ans)

### FIXED CODE ###

import sys
stdin = sys.stdin
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
nn = lambda: list(stdin.readline().split())
ns = lambda: stdin.readline().rstrip()
sys.setrecursionlimit(10**6)

n = ni()
a = na()
b = []
for i in range(n):
    b.append((a[i],i))
 
b.sort(reverse=True)

dp = [[0]*(n+1) for i in range(n+1)]

for i in range(1,n+1):
    x,y = b[i-1]
    for j in range(i+1):
        left = dp[i-1][j-1] + x*abs(y-j+1) if j > 0 else -1
        right = dp[i-1][j] + x*abs(n-i+j-y) if j < i else -1
        dp[i][j] = max(left,right)

print(max(dp[-1]))
import math

r= float(input().rstrip().split(' ')

a = 2r * math.pi

b = r * math.pi

print(a, b)

### FIXED CODE ###

import math

r= float(input())

a = r * r * math.pi

b = 2 * math.pi * r

print(a, b)
n,m = map(int,input().split())
ps = [input().split() for _ in range(m)]


answer =["inf"]*m
count = 0

for i in range(len(ps)):
  if ps[i][0] not in answer:
    if ps[i][1] == "AC":
      answer[i] = ps[i][0]
    else:
      count += 1
answer.remove("inf")
print(len(answer),count)

### FIXED CODE ###

n, m = map(int, input().split())
ac = 0
wa = 0
cnt = [0]*n

for i in range(m):
    p, s = input().split()
    p = int(p)
    p -= 1
    if cnt[p] == -1:
        continue
    elif s == 'AC':
        ac += 1
        wa += cnt[p]
        cnt[p] = -1
    else:
        cnt[p] += 1
print(ac, wa)
H,W,K = map(int,input().split())
s = [input() for _ in range(H)]

a = [[0]*W for _ in range(H)]

cnt = 0

for h in range(H):
    for w in range(W):
        if s[h][w] == '#':
            cnt += 1
            a[h][w] = str(cnt)
            h_ = h-1
            while h_>=0 and a[h_][w]==0 and s[h_][w]=='.':
                a[h_][w] = str(cnt)
                h_ -= 1
            h_ = h+1
            while h_<=H-1 and a[h_][w]==0 and s[h_][w]=='.':
                a[h_][w] = str(cnt)
                h_ += 1

for h in range(H):
    for w in range(W):
        if a[h][w] != 0:
            cnt = int(a[h][w])
            w_ = w-1
            while w_>=0 and a[h][w_]==0:
                a[h_][w] = str(cnt)
                w_ -= 1
            w_ = w+1
            while w_<=W-1 and a[h][w_]==0:
                a[h][w_] = str(cnt)
                w_ += 1
    

for h in range(H):
    print(''.join(a[h]))

### FIXED CODE ###

H,W,K = map(int,input().split())
s = [input() for _ in range(H)]

a = [[0]*W for _ in range(H)]

cnt = 0

for h in range(H):
    for w in range(W):
        if s[h][w] == '#':
            cnt += 1
            a[h][w] = str(cnt)
            h_ = h-1
            while h_>=0 and a[h_][w]==0 and s[h_][w]=='.':
                a[h_][w] = str(cnt)
                h_ -= 1
            h_ = h+1
            while h_<=H-1 and a[h_][w]==0 and s[h_][w]=='.':
                a[h_][w] = str(cnt)
                h_ += 1

for h in range(H):
    for w in range(W):
        if a[h][w] != 0:
            cnt = int(a[h][w])
            w_ = w-1
            while w_>=0 and a[h][w_]==0:
                a[h][w_] = str(cnt)
                w_ -= 1
            w_ = w+1
            while w_<=W-1 and a[h][w_]==0:
                a[h][w_] = str(cnt)
                w_ += 1
    

for h in range(H):
    print(' '.join(a[h]))
# bable sort
def bubbleSort(o_nums, n):
    nums=o_nums[:]
    for i in range(len(nums)-1):
        for j in range(len(nums)-1,i,-1):
            if nums[j][1]<nums[j-1][1]:
                nums[j],nums[j-1]=nums[j-1],nums[j]  
    return nums

# bable sort
def bubbleSort(o_nums, n):
    nums=o_nums[:]
    for i in range(len(nums)-1):
        for j in range(len(nums)-1,i,-1):
            if nums[j][1]<nums[j-1][1]:
                nums[j],nums[j-1]=nums[j-1],nums[j]  
    return nums

n=int(input())
cards=list(input().split())

b=bubbleSort(cards, n)
s=selectionSort(cards,n)
print(*b)
print("Stable")
print(*s)
if bubbleSort(cards, n) == selectionSort(cards, n):
    print("Stable")
else:
    print("Not stable")

### FIXED CODE ###

# bable sort
def bubbleSort(o_nums, n):
    nums=o_nums[:]
    for i in range(len(nums)-1):
        for j in range(len(nums)-1,i,-1):
            if nums[j][1]<nums[j-1][1]:
                nums[j],nums[j-1]=nums[j-1],nums[j]  
    return nums

# selection sort
def selectionSort(o_nums,n):
    nums=o_nums[:]
    for i in range(n):
        minj=i
        for j in range(i,n):
            if nums[j][1]<nums[minj][1]:
                minj=j
        if nums[i][1]!=nums[minj][1]:
            nums[i],nums[minj]=nums[minj],nums[i]
    return nums

n=int(input())
cards=list(input().split())

b=bubbleSort(cards, n)
s=selectionSort(cards,n)
print(*b)
print("Stable")
print(*s)
if bubbleSort(cards, n) == selectionSort(cards, n):
    print("Stable")
else:
    print("Not stable")
R = input()
G= input()
print ( 2*G - R)

### FIXED CODE ###

R = input()
G = input()
R = int(R)
G = int(G)
print ( 2*G - R)
n = int(input())
a = 0
for i in range(1,10):
    if n % i != 0:
        continue
    else:
        if n / i <= 9:
            a += 1
            break
        else:
            continue
if a == 1:
    print('Yes')
else:
    print('No')

### FIXED CODE ###

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

if a > 9 or b > 9:
    print('-1')
else:
	print(a*b)
H, A = map(int, input())
n = (H-1)//A + 1
print(n)

### FIXED CODE ###

H, A = map(int, input().split())
n = (H-1)//A + 1
print(n)