Harryxun/stf_run huggingface dataset:
from collections import deque

H, W = list(map(int,input().split()))
s = []
for i in range(H):  s.append(input())

dx = [0, 1, -1, 0]
dy = [1, 0, 0, -1]
           
def bfs(sx, sy):
    q = deque([])
    d = [[-1 for _ in range(W)] for _ in range(H)]
    q.append([sx, sy])
    d[sy][sx] = 0
    
    while(q):
        pop = q.popleft()
        x, y = pop[0], pop[1]
        for i in range(4):
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx and nx < W and ny >= 0 and ny < H:
                if s[ny][nx] != "#" and d[ny][nx] == -1:
                    q.append([nx, ny])
                    d[ny][nx] = d[y][x] + 1
    return d

def max_dim2(d):
    ret = 0
    for i in range(len(d)):
        for j in d[i]:
            ret = max(ret, j)
    return ret

ans = 0
for i in range(H):
    for j in range(W):
        if d[i][j] == ".":
            ret = bfs(i, j)
            temp = max_dim2(ret)
            ans = max(ans, temp)
print(ans)    

### FIXED CODE ###

from collections import deque

H, W = list(map(int,input().split()))
s = []
for i in range(H):  s.append(input())

dx = [0, 1, -1, 0]
dy = [1, 0, 0, -1]
           
def bfs(sx, sy):
    q = deque([])
    d = [[-1 for _ in range(W)] for _ in range(H)]
    q.append([sx, sy])
    d[sx][sy] = 0
    
    while(q):
        pop = q.popleft()
        x, y = pop[0], pop[1]
        for i in range(4):
            nx = x + dx[i]
            ny = y + dy[i]
            if 0 <= nx and nx < H and ny >= 0 and ny < W:
                if s[nx][ny] != "#" and d[nx][ny] == -1:
                    q.append([nx, ny])
                    d[nx][ny] = d[x][y] + 1
    return d

def max_dim2(d):
    ret = 0
    for i in range(len(d)):
        for j in d[i]:
            ret = max(ret, j)
    return ret

ans = 0
for i in range(H):
    for j in range(W):
        if s[i][j] == ".":
            ret = bfs(i, j)
            temp = max_dim2(ret)
            ans = max(ans, temp)
print(ans)
li=list(map(int,input().split()))
n=li[0]
y=li[1]

for i in range(n):
    for j in range(n-i):
        for k in range(n-i-j):
            if y=10000*i+5000*j+1000*k:
                print(i,j,k)
                break
print(-1,-1,-1)

### FIXED CODE ###

li=list(map(int,input().split()))
n=li[0]
y=li[1]

a,b,c=-1,-1,-1

for i in range(n+1):
    for j in range(n-i+1):
        if y==10000*i+5000*j+1000*(n-i-j):
            a=i
            b=j
            c=n-i-j
            break
print(a,b,c)
x = int(input())
start = int(pow(x,0.2))+1
for i in range(-start,start):
    k = pow(x + pow(i,5),0.2)
    k = round(k,6)
    if type(k) != type(1+1j) and pow(int(k),5) - pow(i,5) == x:
        print(int(k),i)
        exit()





### FIXED CODE ###

x = int(input())
for i in range(-1000,1000+1):
    for j in range(-1000,1001):
        if pow(i,5) - pow(j,5) == x:
            print("{} {}".format(i,j))
            exit()
N=int(input())
for i in range(N):
  if (i**2)>N:
    break:
print(max((i-1)**2,1))

### FIXED CODE ###

N=int(input())
for i in range(N):
  if (i**2)>N:
    break
print(max((i-1)**2,1))
N = int(input())
adj = [[] for _ in range(N+1)]
for e in range(1,N):
  a,b = map(int, input().split())
  adj[a].append((b,e))
  adj[b].append((a,e))

#print(adj)

col_num = max([len(ad) for ad in adj])
edge_color = [0]*N
visited = [False]*(N+1)

def dfs(v,e):
  visited[v] = True
  #print(v,e,edge_color)
  col_lis = [i for i in range(1,col_num+1)]
  if e != 0:
    col_lis.remove(edge_color[e])
  for w,f in adj[v]:
    if visited[w]==True:
      continue
    #if edge_color[e] == 0:
    #print(col_lis)
    edge_color[f] = col_lis.pop(0)
    dfs(w,f)
  return None
#print(col_num)
dfs(1,0)

print(col_num)
for i in range(1,N):
  print(edge_color[i])


### FIXED CODE ###

import sys
sys.setrecursionlimit(10**8)

N = int(input())
adj = [[] for _ in range(N+1)]
for e in range(1,N):
  a,b = map(int, input().split())
  adj[a].append((b,e))
  adj[b].append((a,e))

#print(adj)

col_num = max([len(ad) for ad in adj])
edge_color = [0]*N
visited = [False]*(N+1)

def dfs(v,c=-1):
  #print(v,e,edge_color)
  #col_lis = [i for i in range(1,col_num+1)]
  #if e >0:
    #col_lis.remove(edge_color[e])
  color = 1
  for w,f in adj[v]:
    if visited[w]==False:
      visited[v] = True
      if c==color: color+=1
      edge_color[f] = color
      dfs(w,color)
      color+=1

dfs(1)

print(col_num)
for i in range(1,N):
  print(edge_color[i])
N,Q=map(int,input().split())

T=[[] for i in range(N)]

for i in range(N-1):
    a,b=map(int,input().split())
    T[a-1].append(b-1)
    T[b-1].append(a-1)

O=[0 for i in range(N)]

for i in range(Q):
    p,x=map(int,input().split())
    O[p-1]+=x

def dfs(n,r):
    for i in T[n]:
        if i!=r:
            O[i]+=O[n]

            dfs(i,n)

dfs(0,-1)

print(*O)

### FIXED CODE ###

import sys
sys.setrecursionlimit(10000000)
input=sys.stdin.readline

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

T=[[] for i in range(N)]

for i in range(N-1):
    a,b=map(int,input().split())
    T[a-1].append(b-1)
    T[b-1].append(a-1)

O=[0 for i in range(N)]

for i in range(Q):
    p,x=map(int,input().split())
    O[p-1]+=x

def dfs(n):
    for i in T[n]:
        if r[i]:continue
        r[i]=1
        O[i]+=O[n]
        dfs(i)

r=[1]+[0]*(N-1)

dfs(0)

print(*O)
n,*L = map(int,open(0).read().split())
sum1 = sum(L)
L.sort()
if sum1%10 != 0:
    print(sum1)
    exit()
i = 0
while sum1%10==0:
    if L[i] %10 != 0:
        sum1 -= L[i]
        break
    i +=1
print(sum1)

### FIXED CODE ###

n = int(input())
li = []
for i in range(n):
    li.append(int(input()))
li.sort()
flag1 = False
flag2 = False
flag3 = False
if sum(li)%10 != 0:
    flag2 = True

for i in range(n):
    if (sum(li) - li[i])%10 != 0 and flag2 == False:
        flag1 = True
        break
    else:
        flag3 =True
    
if flag1:
    print (sum(li) - li[i])
elif flag2:   
    print(sum(li))
elif flag3:
    print(0)
n, k = map(int , input().split())
h = list(map(int, input().split()))
count = 0
h.sort()
del h[-k]
for i in range(n - k):
    count += h[i]
print(count)

### FIXED CODE ###

n, k = map(int , input().split())
h = list(map(int, input().split()))
count = 0
MOD = 1000000007
h.sort()
try:
    if(k != 0):
        del h[-k]
    for i in range(n - k):
        count += h[i]%MOD
    print(count)
except IndexError:
    count = 0
    print(count)
import numpy as np
n,k = map(int,input().split())

a = np.array(input().split(),np.int)

F = np.array(input().split(),np.int)

A.sort()
F.sort()
F = F[::-1]

left = -1
right = (A * F).sum()

while (right - left) > 1:
    s = left + ((right - left) // 2)
    for i in range(n):
        b = np.minimum(s//F,A)
    if (A - b).sum() <= k:
        right = s 
    else:
        left = s 

print(right)


### FIXED CODE ###

import numpy as np
n,k = map(int,input().split())

A = np.array(input().split(),np.int)

F = np.array(input().split(),np.int)


A.sort()
F.sort()

F_ = F[::-1]

left = -1
right = (A * F_).sum()

while (right - left) > 1:
    s = (left + right) // 2
    r = np.maximum(0, A - s // F_).sum() <= k
    if r:
        right = s 
    else:
        left = s 

print(right)
w,h,x,y=map(int,input().split())

elif w/2==x and h/2==y:
    ans=1

else:
    ans=0


print(w*h/2,ans)

### FIXED CODE ###

w,h,x,y=map(int,input().split())

if w/2==x and h/2==y:
    ans=1

else:
    ans=0


print(w*h/2,ans)
N, K = input().split()
N[int(K)] = N[int(K)].lower()
print(N)


### FIXED CODE ###

N, K = map(int,input().split())
S = input()
S = list(S)
S[K-1] = S[K-1].lower()
print(''.join(S))
a, b = [int(i) for i in input().split()]
print(max(0, a - 2 * b)

### FIXED CODE ###

a, b = [int(i) for i in input().split()]
print(max(0, a - 2 * b))
import numpy as np

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

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

count = 0
for i in range (N):
    A = list(map(int,input().split()))
    if np.array(A)*np.array(B) > 0:
        count += 1
print(count)

### FIXED CODE ###

import numpy as np
 
N, M, C = map(int,input().split())
 
B = list(map(int,input().split()))
 
count = 0
for i in range (N):
    A = list(map(int,input().split()))
    if np.sum(np.array(A)*np.array(B)) + C> 0:
        count += 1
print(count)
import math

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

p = 0

if K>N:
    tp = 0
    for i in range(1,N+1):
        #deme i
        tp += 0.5**math.ceil(math.log2(K/i))
    tp = tp / N
    print(tp)
else:
    p = (N-K+1)/N#No coin
    tp = 0
    for i in range(1,K):
        #deme i
        tp += 0.5**math.ceil(math.log2(K/i))
    tp = tp / (K-1)
    print(p+(1-p)*tp)



### FIXED CODE ###

import math

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

p = 0.0

if K>N:
    tp = 0.0
    for i in range(1,N+1):#1~N
        #deme i
        tp += 0.5**math.ceil(math.log2(K/i))
    tp = tp / N
    print(tp)
elif K == 1:
    print(1.0)
else:
    p = (N-K+1.0)/N#No coin
    tp = 0.0
    for i in range(1,K):#1~K-1
        #deme i
        tp += 0.5**math.ceil(math.log2(K/i))
    tp = tp / (K-1.0)
    print(p+(1.0-p)*tp)
N, M = map(int, input().split())
if not (1 <= M):
    1 // 0
if not (M * 2 + 1 <= N <= 200000:
    1 // 0

### FIXED CODE ###

import sys

sys.setrecursionlimit(10 ** 8)

input = sys.stdin.readline


def main():
    A, B, N = [int(x) for x in input().split()]

    def f(m):
        return (A * m) // B - A * (m // B)

    l = f(0)
    e = f(N)

    def isOK(mid):
        if f(mid) - l >= 0:
            return True
        else:
            return False
    def isOK2(mid):
        if f(mid) - e >= 0:
            return True
        else:
            return False

    ok = 0
    ng = N + 1

    loopn = 0

    while abs(ok - ng) > 1:
        loopn += 1
        if loopn >= 10 ** 6:
            break
        mid = (ok + ng) // 2
        if isOK(mid):
            ok = mid
        else:
            ng = mid

    ans = max(l, e, f(ok))
    for i in range(max(0, ok - 10000), min(N + 1, ok + 10000)):
        ans = max(ans, f(i))
    for i in range(max(0, ng - 10000), min(N + 1, ng + 10000)):
        ans = max(ans, f(i))

    ok = N
    ng = 0

    loopn = 0

    while abs(ok - ng) > 1:
        loopn += 1
        if loopn >= 10 ** 6:
            break
        mid = (ok + ng) // 2
        if isOK2(mid):
            ok = mid
        else:
            ng = mid

    ans = max(ans, l, e, f(ok))
    for i in range(max(0, ok - 10000), min(N + 1, ok + 10000)):
        ans = max(ans, f(i))
    for i in range(max(0, ng - 10000), min(N + 1, ng + 10000)):
        ans = max(ans, f(i))

    print(max(ans, f(min(B - 1, N))))


if __name__ == '__main__':
    main()
(m,n)=map(int, raw_input().split())
    if n==0 & m==0 : break
    else: print ((('#'*n)+'\n')*m)

### FIXED CODE ###

while True:
    (m,n)=map(int, raw_input().split())
    if n==0 and m==0: break
    else: print (('#'*n+'\n')*m)
import sys

def f(x):
    p=0
    cnt=0
    for i in range(n-1,-1,-1):
        while p<n and a[i]+a[p]<x:
            p+=1
        cnt+=n-p
    return cnt

n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()

l,r=a[0]*2,a[n-1]*2

while r-l>0:
    if r-l<=1:
        if f(r)==m: md=r;break 
        else: md=l;break
    md=(r+l)//2
    k=f(md)
    if k==m: break
    elif k>m: l=md
    else: r=md


p=0
cnt=0
ans=0

for q in range(n-1,-1,-1):
    try:
        while p<n and q>-1 and a[q]+a[p]<=md:
            p+=1
    except:
        p=n

    cnt+=n-p
    ans+=a[q]*(n-p)*2
    if p==n: break


ans+=(m-cnt)*md
print(ans)

### FIXED CODE ###

import sys

def f(x):
    p=0
    cnt=0
    for i in range(n-1,-1,-1):
        while p<n and a[i]+a[p]<x:
            p+=1
        cnt+=n-p
    return cnt

n,m=map(int,input().split())
a=list(map(int,input().split()))
a.sort()

l,r=a[0]*2,a[n-1]*2
md=(r+l)//2
while r-l>0:
    if r-l<=1:
        if f(r)==m: md=r;break 
        else: md=l;break
    md=(r+l)//2
    k=f(md)
    if k==m: break
    elif k>m: l=md
    else: r=md

p=0
cnt=0
ans=0

for q in range(n-1,-1,-1):
    try:
        while p<n and a[q]+a[p]<=md:
            p+=1
    except:
        b=1
        while True:
            b+=1

    if p==n: break
    cnt+=n-p
    ans+=a[q]*(n-p)*2


ans+=(m-cnt)*md
print(ans)
n = int(input())
d = list(map(int,input().split()))
d.sort()
ans = d[n/2] - d[(n/2)-1]
print(ans)

### FIXED CODE ###

n = int(input())
d = list(map(int,input().split()))
d.sort()
ans = d[int(n/2)] - d[int(n/2)-1]
print(ans)
import statistics as stats
from math import factorial


def nCr(n, r):
    return int(factorial(n)/factorial(n-r)/factorial(r))


def main():
    N, A, B = tuple(map(int, input().split(' ')))
    max_ave = 0
    v_list = sorted(list(map(int, input().split(' '))), reverse=True)

    bucket_min = v_list[A-1]
    bucket_max = v_list[0]
    max_bucket = v_list[:A]

    max_ave = stats.mean(max_bucket)

    all_num = v_list.count(bucket_min)
    bucket_num = max_bucket.count(bucket_min)


    print(max_ave)
    if bucket_min == bucket_max:
        if all_num >= B:
            print(2**B-1)
        else:
            num = sum([nCr(all_num, r) for r in range(A, B+1)])
            print(num)
    else:
        print(nCr(all_num, bucket_num))


if __name__ == '__main__':
    main()


### FIXED CODE ###

import math


def C(n,r):
    fact = math.factorial
    return fact(n) // fact(r) // fact(n-r)

def main():
    N, A, B = tuple(map(int, input().split(' ')))
    v = list(map(int, input().split(' ')))

    v.sort(reverse=True)

    print(sum(v[:A])/A)

    a, b = v.count(v[A-1]), v[:A].count(v[A-1])

    if v[0] == v[A-1]:
        print(sum([C(a, r) for r in range(A, min(B, a)+1)]))
    else:
        print(C(a, b))



if __name__ == '__main__':
    main()
a, b, c = map(int, input().split())

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

### FIXED CODE ###

a = input().split()
if int(a[0]) == int(a[1]) and int(a[1]) == int(a[2]):
	print("Yes")
else:
	print("No")
N = int(input())
S = input()
 
ansAC = 0
ansWA = 0
ansTLE = 0
ansRE = 0
 
for i in S:
  if i == "AC":
    ansAC += 1
  elif i == "TLE":
    ansTLE += 1
  elif i == "WA":
    ansWA += 1
  elif i == "RE":
    ansRE += 1
print("AC x " + ansAC)
print("WA x " + ansWA)
print("TLE x " + ansTLE)
print("RE x " + ansRE)

### FIXED CODE ###

N = int(input())
ansAC = 0
ansWA = 0
ansTLE = 0
ansRE = 0
 
for i in range(N):
  S = input()
  if S == "AC":
    ansAC += 1
  elif S == "TLE":
    ansTLE += 1
  elif S == "WA":
    ansWA += 1
  elif S == "RE":
    ansRE += 1
print("AC x " + str(ansAC))
print("WA x " + str(ansWA))
print("TLE x " + str(ansTLE))
print("RE x " + str(ansRE))
import math
N, K = map(int, input().split())
A=list(map(int,input().split()))
maxA = max(A)
right = maxA
left = 0
while(right-left>1):
    mid = (left+right)//2
    count = 0
    for i in A:
        count += (i-1)//mid
    if count > K:
        left = mid
    elif count <= K:
        right = mid
print(mid)


### FIXED CODE ###

N, K = map(int, input().split())
A=list(map(int,input().split()))
A.sort()
right = A[-1]+1
left = 0
flag = True
mid = (left+right)//2
minN = right
result = mid
while right-left>1 and flag:
    mid = (left+right)//2
    count = 0
    for i in A:
        count += (i-1)//mid
    if count <= K:
        right = mid
        if minN>mid:
            minN = mid
            result = mid
    elif count > K:
        left = mid
print(result)
x, n = map(int,input().split())
p = list(map(int,input().split()))

y = []
z = []
for i in range(n):
    if x - p[i] >= 0:
        y.append(x - p[i])
    else:
        z.append(p[i] - x)



y = sorted(y)
z = sorted(z)

if y[0] == z[0]:
    print(y[0])
elif y[0] > z[0]:
    print(z[0])
else:
    print(y[0])

### FIXED CODE ###

x, n = map(int,input().split())
p = list(map(int,input().split()))
y = 0
z = 0
while y == 0:
    a = x + z
    b = x - z
    if a in p and b in p:
        z += 1
    elif a not in p and b in p:
        print(a)
        y = 4
    elif b not in p:
        print(b)
        y = 5
def main():
    N = input()
    return N % 1000


if __name__ == "__main__":
    main()


### FIXED CODE ###

def main():
    N = int(input())
    if N % 1000 == 0:
        print(0)
    else:
        print(1000 - (N % 1000))


if __name__ == "__main__":
    main()
from collections import deque

def bfs(maze, h, w, si, sj, gi, gj):
    memo = [[0] * w for i in range(h)]
    q = deque([[si, sj]])
    score = [[0] * w for i in range(h)]

    pattern = [[1, 0], [-1, 0], [0, 1], [0, -1]]
    while len(q) > 0:
        i, j = q.popleft()
        if i == gi and j == gj:
            return score[gi][gj]
        for move in pattern:
            ni, nj= i + move[0], j + move[1]
            if ni < 0 or h <= ni or nj < 0 or w <= nj:
                continue
            p = maze[ni][nj]
            if p == '#':
                continue
            if p == '.' and not score[ni][nj]:
                score[ni][nj] = score[i][j] + 1
                q.append([ni, nj])

h, w = map(int, input().split())
maze = [input() for i in range(h)]
scores = []
for si in range(h):
    for sj in range(w):
        if maze[si][sj] == "#":
            continue
        for gi in range(h):
            for gj in range(w):
                if maze[gi][gj] == "#" or (si == gi and sj == gj) or (gi, gj) in memo:
                    continue
                scores.append(bfs(maze, h, w, si, sj, gi, gj))
print(max(scores))


### FIXED CODE ###

from collections import deque

def bfs(maze, h, w, si, sj):
    q = deque([[si, sj]])
    score = [[-1] * w for i in range(h)]
    score[si][sj] = 0
    pattern = [[1, 0], [-1, 0], [0, 1], [0, -1]]
    while len(q) > 0:
        i, j = q.popleft()
        for move in pattern:
            ni, nj= i + move[0], j + move[1]
            if ni < 0 or h <= ni or nj < 0 or w <= nj:
                continue
            p = maze[ni][nj]
            if p == '#':
                continue
            if p == '.' and score[ni][nj] == -1:
                score[ni][nj] = score[i][j] + 1
                q.append([ni, nj])
    return max(map(max, score))

h, w = map(int, input().split())
maze = [input() for i in range(h)]
scores = []
for si in range(h):
    for sj in range(w):
        if maze[si][sj] == "#":
            continue
        scores.append(bfs(maze, h, w, si, sj))
print(max(scores))
n,d= map(int, input().split())
x,y=[int(input()) for i in range(n)]

def f(a,b,c):
  s=0
  for i in range(N)
  　　if (a[i]**2 + b[i]**2)**(1/2)<= c:
     　　s=s+1
  return s

print(f(x,y,d))

### FIXED CODE ###

N,D = map(int, input().split())
XY = [map(int, input().split()) for _ in range(N)]
X,Y = [list(i) for i in zip(*XY)]

s=0
for i in range (N):
  if X[i]*X[i]+Y[i]*Y[i]<=D*D:
    s=s+1
print(s)
n=int(input())
k=input()
l=[]
ol=len(k)
for i in range(n):
  l.append(k[i])
if(ol>n):
  print("".join(l)+"...")
elif(ol<=n):
  print(k)


### FIXED CODE ###

n=int(input())
k=input()
if(len(k)>n):
  k=k[:n]+"..."
print(k)
n,a = map(int,input().split())
dp = [[0]*2000 for _ in range(n+1)]
dp[0][1000] = 1
x = list(map(int,input().split()))
for i in range(n):
  x[i] -= a
for i in range(1,n+1):
  for j in range(2001):
    dp[i][j] = dp[i-1][j] + dp[i-1][j-x[i-1]]
print(dp[n][1000])

### FIXED CODE ###

n,a = map(int,input().split())
dp = [[0]*2000 for _ in range(n+1)]
dp[0][1000] = 1
x = list(map(int,input().split()))
for i in range(n):
  x[i] -= a
for i in range(n):
  for j in range(2000):
    dp[i+1][j] += dp[i][j]
    if 0<=j+x[i]<2000:
      dp[i+1][j+x[i]] += dp[i][j]
print(dp[n][1000]-1)
X, N = map(int, input().split())
if N == 0:
    print(X)
    exit()

P = list(map(int, input().split()))
minmin = []
minn = 101
for i in range(1, 101):
    abs1 = abs(i - X)
    if not i in P and minn >= abs1:
        minn = abs1
        minmin.append(i)

if len(minmin) > 2 and abs(X - minmin[-1]) == abs(X - minmin[-2]):
    print(minmin[-2])
    exit()
print(max(minmin))


### FIXED CODE ###

X, N = map(int, input().split())
if N == 0:
    print(X)
    exit()

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

for i in range(101):
    p = X - i not in P
    p1 = X + i not in P
    if p1 or p:
        if p:
            print(X - i)
            exit()
        print(X + i)
        exit()
w = int(input())
n = int(input())
l = list(range(1,w+1))
for i in range(n):
	a,b = map(int,input().split(','))
	a -= 1
	b - = 1
	l[a],l[b] = l[b],l[a]
for x in l:
	print(x)




### FIXED CODE ###

w = int(input())
n = int(input())
l = list(range(1,w+1))
for i in range(n):
	a,b = map(int,input().split(','))
	a -= 1
	b -= 1
	l[a],l[b] = l[b],l[a]
for x in l:
	print(x)
s=input()
i=1
n=0
ans=[]
sta=0
 
while i<=len(s):
  if s[i-1]=='A'or s[i-1]=='T' or s[i-1]=='C' or s[i-1]=='G':
    n=n+1
    sta=1
  elif sta==1:
    ans.append(n)
    n=0
    
  i=i+1
if sta==0:
  ans=[0]
  
print(max(ans))

### FIXED CODE ###

s=input()
i=1
n=0
ans=[0]
sta=0

 
while i<=len(s):
  if s[i-1]=='A'or s[i-1]=='C' or s[i-1]=='G' or s[i-1]=='T':
    n=n+1
    sta=1
  elif sta==1:
    ans.append(n)
    n=0

  if i<=len(s)&n==len(s):
    ans.append(n)
  elif n!=0:
      ans.append(n)
    
  i=i+1
  
print(max(ans))
import sys
input = sys.stdin.readline
import math
import numpy as np
def lcm(a, b):
    return a * b // math.gcd(a, b)
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    print(lcm(A, B))
if __name__ == '__main__':
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)


### FIXED CODE ###

import sys
input = sys.stdin.readline
def gcd(a,b):
    while b!=0:
        a,b=b,a%b
    return a
def print_ans(A, B):
    """Test Case
    >>> print_ans(2, 3)
    6
    >>> print_ans(123, 456)
    18696
    >>> print_ans(100000, 99999)
    9999900000
    """
    print(A * B // gcd(A, B))
if __name__ == '__main__':
    # test
    A, B = map(int, input().rstrip().split())
    print_ans(A, B)
from collections import deque

N, K = map(int, input().split())
x = list(map(int, input().split()))

x_upper = []

for i in reversed(x):
    if i<0:
        break
    if i>=0:
        x_upper.append(i)
        x.pop()
        
#絶対値昇順へソート
x.reverse()
x_upper.reverse()

lenXu = len(x_upper)
lenX = len(x)

if K>lenXu:
    l = K-lenXu-1
    h = lenXu-1
else:
    l = -1
    h = K-1

S = []
while l<K and l<lenX:
    if l>=0:
        if (x[l]*(-1))<x_upper[h]:
            S.append((x[l]*(-1))*2 + x_upper[h])
        else:
            S.append((x[l]*(-1)) + x_upper[h]*2)
    else:
        S.append(x_upper[h])
    l += 1
    h -= 1

print(min(S))


### FIXED CODE ###

from collections import deque

N, K = map(int, input().split())
x = list(map(int, input().split()))

x_upper = []

for i in reversed(x):
    if i<0:
        break
    if i>=0:
        x_upper.append(i)
        x.pop()
        
#絶対値昇順へソート
x.reverse()
x_upper.reverse()

lenXu = len(x_upper)
lenX = len(x)

if K>lenXu:
    l = K-lenXu-1
    h = lenXu-1
else:
    l = -1
    h = K-1

S = []
while l<K and l<lenX:
    if h<0:
        S.append(x[l]*(-1))
    elif l<0:
        S.append(x_upper[h])
    else:
        if (x[l]*(-1))<x_upper[h]:
            S.append((x[l]*(-1))*2 + x_upper[h])
        else:
            S.append((x[l]*(-1)) + x_upper[h]*2)
    l += 1
    h -= 1

print(min(S))
i=gets
i=i.to_i
print i*i*i,"\n"

### FIXED CODE ###

input_num = int(input())
print(input_num ** 3)