Harryxun/stf_run huggingface dataset:
S = input()
T = input()

if len(S)==len(T):
    for i in range(len(T)):
        if T[i] != S[i+n+1]:
            count+=1
    print(count)

else:
    countbox=[]
    for n in range(len(S)-len(T)):
        count =0
        for i in range(len(T)):
            if T[i] != S[i+n+1]:
                count+=1
        countbox.append(count)
    print(min(countbox))

### FIXED CODE ###

S = input()
T = input()

if len(S)==len(T):
    count=0
    for i in range(len(T)):
        if T[i] != S[i]:
            count+=1
    print(count)

else:
    countbox=[]
    for n in range(len(S)-len(T)+1):
        count =0
        for i in range(len(T)):
            if T[i] != S[i+n]:
                count+=1
        countbox.append(count)
    print(min(countbox))
import sys
     
    def main():
        sinputl = sys.stdin.readline
     
        num_card, num_gate = [int(x) for x in sinputl().split()]
        input = [[int(x) for x in sinputl().split()] for _ in range(num_gate)]
     
        under_limit = [x[0] for x in input]
        over_limit = [x[1] for x in input]
     
        print(max(min(over_limit) - max(under_limit) + 1, 0))
     
     
    if __name__ == "__main__":
        main()

### FIXED CODE ###

import sys

def main():
    sinputl = sys.stdin.readline

    num_card, num_gate = [int(x) for x in sinputl().split()]
    input = [[int(x) for x in sinputl().split()] for _ in range(num_gate)]

    card = [1, num_card]

    for gate in input:
        card[0] = max(card[0], gate[0])
        card[1] = min(card[1], gate[1])

    print(max(card[1] - card[0] + 1, 0))


if __name__ == "__main__":
    main()
n = input()
s = input()
flag = 0
for i in range(1,int(n)-1):
  if s[i-1] + s[i] + s[i+1] = "ABC":
    flag += 1
print(flag)

### FIXED CODE ###

N = int(input())
S = input()
print(S.count("ABC"))
def decrease(A,N):
    t = 0
    while(1):
        if max(A) <= N -1: break
        else:
            for i in range(N): A[i] = A[i] + 1
            i = A.index(max(A))
            A[i] = A[i] - N - 1
            t += 1
    return t


if __name__ == '__main__':
    K = int(input())
    p,q = K // 50, K % 50
    A = [i for i in range(50)]
    A = [a + p for a in A]
    for i in range(q):
        A = [a - 1 for a in A]
        A[i] += N + 1

    print(len(A))
    A = [str(a) for a in A]
    print(" ".join(A))

### FIXED CODE ###

def decrease(A,N):
    t = 0
    while(1):
        if max(A) <= N -1: break
        else:
            for i in range(N): A[i] = A[i] + 1
            i = A.index(max(A))
            A[i] = A[i] - N - 1
            t += 1
    return t


if __name__ == '__main__':
    K = int(input())
    p,q = K // 50, K % 50
    A = [i for i in range(50)]
    N = 50
    A = [a + p for a in A]
    for i in range(q):
        A = [a - 1 for a in A]
        A[i] += N + 1

    print(len(A))
    A = [str(a) for a in A]
    print(" ".join(A))
isstr=input()
n,m = [int(i) for i in isstr.split(' ')]
l=[0]*m
r=[0]*m
for i in range(m):
    l[i],r[i]=[int(i) for i in input().split(' ')]
a=[0]*n
for i in range(m):
    a[l[i]-1]=1
    a[l[i]]=1
    a[r[i]-1]=1
print(sum(a))

### FIXED CODE ###

isstr=input()
n,m = [int(i) for i in isstr.split(' ')]
l=[0]*m
r=[0]*m
for i in range(m):
    l[i],r[i]=[int(i)-1 for i in input().split(' ')]
x=min(r)-max(l)+1
x=x if x>0 else 0
print(x)
H=int(input())+1
A=[0]+list(map(int,input().split()))
def h(i):
 l=2*i;r=l+1
 g=i
 if r<H and A[g]<A[r]:g=l if A[i]<A[l]else r
 else:if l<H and A[i]<A[l]:g=l
 if g>i:A[i],A[g]=A[g],A[i];h(g)
for i in range(H//2,0,-1):h(i)
print(' '+' '.join(map(str,A[1:])))


### FIXED CODE ###

H=int(input())+1
A=[0]+list(map(int,input().split()))
def s(x,y):A[x],A[y]=A[y],A[x];h(y)
def h(i):
 l=2*i;r=l+1
 if r<H:
  if A[i]<A[l]:
   if A[l]<A[r]:s(i,r)
   else:s(i,l)
  elif A[i]<A[r]:s(i,r)
 elif l<H and A[i]<A[l]:s(i,l)
for i in range(H//2,0,-1):h(i)
print(' '+' '.join(map(str,A[1:])))
import numpy as np
n,k,s = map(int,input().split())
a=np.arange(n)
if k>0 & s<=1000000000:
  a[:k]=s
  a[k:]=s+1
elif k>0 & s=1000000000:
  a[:k]=s
  a[k:]=s-1
else:
  a[:]=s+1
for s in a:
  print(s, end =" ")

### FIXED CODE ###

import numpy as np
n,k,s = map(int,input().split())
a=np.arange(n)
if k>0 and s<1000000000:
  a[:k]=s
  a[k:]=s+1
elif k>0 and s>=1000000000:
  a[:k]=s
  a[k:]=s-1
elif k==0 and s>=1000000000:
  a[:]=s-1
else:
  a[:]=s+1
for s in a:
  print(s, end =" ")
import sys
N, Q = [int(i) for i in input().split()]
tree = {i:[] for i in range(N)}
cost_ls = [0 for i in range(N)]
for i in range(N-1):
    a, b = [int(j) for j in sys.stdin.readline().split()]
    a -= 1
    b -= 1
    tree[a].append(b)
    tree[b].append(a)

yet = set()
def plus(node, num):
    yet.add(node)
    cost_ls[node] += num
    if len(tree[node]) > 0:
        for child in tree[node]:
            if child in yet:
                continue
            plus(child, cost_ls[node])

for i in range(Q):
    p, x = [int(j) for j in sys.stdin.readline().split()]
    cost_ls[p-1] += x

plus(0, 0)

print(" ".join([str(cost) for cost in cost_ls]))

### FIXED CODE ###

import sys

input = sys.stdin.readline
sys.setrecursionlimit(10 ** 6)

N, Q = map(int, input().split())
V = {i: [] for i in range(1, N + 1)}
for _ in range(N - 1):
    a, b = map(int, input().split())
    V[a].append(b)
    V[b].append(a)

C = {i: 0 for i in range(1, N + 1)}

for _ in range(Q):
    p, x = map(int, input().split())
    C[p] += x


def propagate(u, p):
    for v in V[u]:
        if v == p:
            continue
        C[v] += C[u]
        propagate(v, u)


propagate(1, 0)

print(' '.join(str(C[i]) for i in range(1, N + 1)))
s = list(set(list(input())))
a = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
li = []
for i in range(len(s)):
  if s[i] not in a:
    li.append(s[i])
print(min(li))


### FIXED CODE ###

s = list(set(list(input())))
a = ["a","b","c","d","e","f","g","h","i","j","k","l","m","n","o","p","q","r","s","t","u","v","w","x","y","z"]
li = []
for i in range(len(a)):
  if a[i] not in s:
    li.append(a[i])
if len(li) == 0:
    print("None")
else:
    print(min(li))
n = int(input())
graph = [[] for _ in range(n)]
for i in range(1, n):
    graph[int(input()) - 1].append(i)


def dfs(x):
    arr = [dfs(y) for y in graph[x]]
    if not (arr):
        return 0
    arr.sort(reverse=True)
    return max(i + a for i, a in enumerate(arr, 1))


print(dfs(0))


### FIXED CODE ###

import sys
input = sys.stdin.readline
sys.setrecursionlimit(10 ** 7)
n = int(input())
graph = [[] for _ in range(n)]
for i in range(1, n):
    graph[int(input()) - 1].append(i)


def dfs(x):
    arr = [dfs(y) for y in graph[x]]
    if not (arr):
        return 0
    arr.sort(reverse=True)
    return max(i + a for i, a in enumerate(arr, 1))

print(dfs(0))
N = int(input())
h_ls = list(map(int,input().split(" ")))

h_ls = np.array(h_ls)
n = 0
h_len = len(h_ls)
while max(h_ls)!=0:
    max_ind = h_ls.argmax()
    d = 0
    while max_ind+d < h_len -1 and h_ls[max_ind+d+1]==h_ls[max_ind]:
        d+=1
    h_ls[max_ind:max_ind+d+1] =h_ls[max_ind:max_ind+d+1]-1
    n+=1
    print(h_ls)

print(n)


### FIXED CODE ###

import numpy as np

N = int(input())
h_ls = list(map(int,input().split(" ")))

h_ls = np.array(h_ls)
n = 0
h_len = len(h_ls)
while max(h_ls)!=0:
    max_ind = h_ls.argmax()
    d = 0
    while max_ind+d < h_len -1 and h_ls[max_ind+d+1]==h_ls[max_ind]:
        d+=1
    h_ls[max_ind:max_ind+d+1] =h_ls[max_ind:max_ind+d+1]-1
    n+=1

print(n)
from functools import reduce; from operator import add; print((lambda T, L: reduce(add, (lambda t, l: [min(i - j, t) for i, j in zip(l[1:], l[:-1])])(T, L), initializer=T))(int(input().split()[1]), list(map(int, input().split()))))


### FIXED CODE ###

from functools import reduce; from operator import add; print((lambda T, L: (reduce(add, (lambda t, l: [min(i - j, t) for i, j in zip(l[1:], l[:-1])])(T, L)) + T) if len(L) > 1 else T)(int(input().split()[1]), list(map(int, input().split()))))
N=list(str(input()))
a=len(N)
if N[0]==N[(a-1)/2] and N[a]==N[(a+3)/2]:
  print("yes")
else:
  print("No")

### FIXED CODE ###

S=list(map(str,input()))
if S[0]==S[int((len(S)-1)/2-1)] and S[:int((len(S)-1)/2)]==S[int((len(S)+1)/2):]:
    print("Yes")
else:
    print("No")
S = input()
x = 0
if S == 'RSR':
    print(1)
else:
    for i in S:
        if i == 'R':
            x += 1
    print(a)

### FIXED CODE ###

S = input()
x = 0
if S == 'RSR':
    print(1)
else:
    for i in S:
        if i == 'R':
            x += 1
    print(x)
#AtCoder
import math
A, B = input().split()

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

print(lcm(int(A), int(B)))

### FIXED CODE ###

import fractions
A, B = map(int, input().split())

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

ans = lcm(A, B)
print(ans)
a = list(map(int, input().split()))
if (a[0]*a[1])%2 == 0:
	print('Even')
else
	print('Odd')

### FIXED CODE ###

a = list(map(int, input().split()))
b = a[0]*a[1]
if b%2 == 0:
    print('Even')
else:
    print('Odd')
from functools import lru_cache

M, N = map(int,input().split())
VW = [[int(x) for x in input().split()] for _ in range(N)]
VW = sorted(VW, key=lambda x:(x[0]/x[1],x[0]))
@lru_cache(maxsize=None)
def dp(h):
    if h<=0:
        return 0
    else:
        best = float("inf")
        for a,b in VW:
            val = b+dp(h-a)
            if val < best:
                best = val
            else:
                break
        return best
print(dp(M))


### FIXED CODE ###

import numpy as np
h, N = map(int,input().split())
VW = [[int(x) for x in input().split()] for _ in range(N)]
VW = np.array(sorted(VW, key=lambda x:(x[0]/x[1],x[0])))
a = VW[:, 0]
b = VW[:, 1]

dp = np.zeros(10**4+1, dtype=np.int)
for i in range(1, h+1):
    dp[i] = (dp[i-a]+b).min()
print(dp[h])
n,m = map(int, input().split())
sc = [map(int, input().split()) for _ in range (m)]
s,c = [list(i) for i in zip(*sc)]

start = 0 if n == 1 else 10**(n-1)
for j in range(start,10**n+1):
    judge = 0
    for k in range(m):
        if str(j)[s[k]-1] == str(c[k]):
            judge += 1
        else:
            pass

    if judge == m:
        print(j)
        break
    elif j == 10**n:
        print(-1)
        #print(judge) #test
    else:
        pass

### FIXED CODE ###

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

if m != 0:
    sc = [map(int, input().split()) for _ in range (m)]
    s,c = [list(i) for i in zip(*sc)]
else:
    pass

start = 0 if n == 1 else 10**(n-1)
for j in range(start,10**n+1):
    judge = 0
    for k in range(m):
        if str(j)[s[k]-1] == str(c[k]):
            judge += 1
        else:
            pass

    if judge == m:
        print(j)
        break
    elif j == 10**n:
        print(-1)
        #print(judge) #test
    else:
        pass
x=[list(input().split()) for _ in range(3)]
print(x[0][0]+x[1][1]+x[2][2])

### FIXED CODE ###

x=input()
y=input()
z=input()
print(x[0]+y[1]+z[2])
in=input()
for i in range(len(in)):
  if(in[i]=="7"):
    print("Yes")
    exit(0)
print("No")
s = input()
for i in range(len(s)):
  if(s[i]=='7'):
    print("Yes")
    exit(0)
print("No")


### FIXED CODE ###

N=input()
if '7' in N:
    print('Yes')
else:
    print('No')
A, B = [int(i) for i in input().split()]
List = [A+B, A-B, A*B]
List = sorted(List)
print(List[3])

### FIXED CODE ###

A, B = [int(i) for i in input().split()]
List = [A+B, A-B, A*B]
List = sorted(List)
print(List[2])
k = int(Input)
x = 7%k
l = []
i = 1
while(True):
    if x in l:
        print('-1')
        break
    if x==0:
        print(i)
        break    
        
    l.append(x)
    x = (x*10+7)%k
    i += 1

### FIXED CODE ###

k = int(input())
x = 7%k
i = 1
for i in range(1,k+1):
    if x==0:
        break    
    x = (x*10+7)%k
    i += 1
    
if x == 0:
    print(i)
else:
    print('-1')
n = int(input())
xu = [list(int,input().split()) for i in range(n)]
sigma = 0

for j in range(n):
  if xu[j][1] == "BTC":
    sigma = sigma + int(xu[j][0])*380000
  else:
    sigma = sigma + int(xu[j][0])
    
print(sigma)

### FIXED CODE ###

n = int(input())
xu = [list(input().split()) for i in range(n)]
sigma = 0

for j in range(n):
  if xu[j][1] == "BTC":
    sigma = sigma + float(xu[j][0])*380000
  else:
    sigma = sigma + float(xu[j][0])
    
print(sigma)
x = int(input())
if x[-1] == 3:
  print('bon')
elif x[-1] == 0 or x[-1] == 1 or x[-1] == 6 or x[-1] == 8:
  print('pon')
else:
  print('hon')

### FIXED CODE ###

x = str(input())

if x[-1] == '3':
    print('bon')
elif x[-1] == '0' or x[-1] == '1' or x[-1] == '6' or x[-1] == '8':
    print('pon')
else:
    print('hon')
N = int(input())
S = input()
L=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
A = []
 
for c in S:
  i = L.find(c)
  A.append(L[(i + n)%26])
  
print(''.join(A))

### FIXED CODE ###

N = int(input())
S = input()
L=['A','B','C','D','E','F','G','H','I','J','K','L','M','N','O','P','Q','R','S','T','U','V','W','X','Y','Z']
A = []
 
for c in S:
  i = L.index(c)
  A.append(L[(i + N)%26])
  
print(''.join(A))
A, op, B = str(input()).split()
A = int(A)
B = int(B)
op = str("+", "-")
if op =="+":
    print(A + B)
elif op == "-":
    print(A - B)

### FIXED CODE ###

A, op, B = input().split()

if op =="+":
    print(int(A) + int(B))
elif op == "-":
    print(int(A) - int(B))
import numpy as np
from scipy.sparse.csgraph import connected_components
N,M,K = map(int,input().split())
follow = [[False for i in range(N)] for j in range(N)]
block = [[False for i in range(N)] for j in range(N)]
edges = [0 for i in range(N)]

for i in range(M):
    A,B = map(int,input().split())
    A = A-1
    B = B-1
    follow[A][B] = True
    follow[B][A] = True
    edges[A] = edges[A] + 1
    edges[B] = edges[B] + 1

n,labels = connected_components(np.array(follow))

groupV = [0]*n
for i in range(N):
    groupV[labels[i]] = groupV[labels[i]] + 1

for i in range(K):
    C,D = map(int,input().split())
    C = C-1
    D = D-1
    if (labels[C] != labels[D]) : continue
    block[C][D] = True
    block[D][C] = True
    edges[C] = edges[C] + 1
    edges[D] = edges[D] + 1

ans = ["0"]*N

for i in range(N):
    ans[i] = str(groupV[labels[i]] - 1 - edges[i])

print(" ".join(ans))




### FIXED CODE ###

N,M,K = map(int,input().split())
#follow = [[False for i in range(N)] for j in range(N)]
follow = [[] for _ in range(N)]
labels = [-1 for _ in range(N)]
edges = [0 for _ in range(N)]

for i in range(M):
    A,B = map(int,input().split())
    A = A-1
    B = B-1
    follow[A].append(B)
    follow[B].append(A)
    edges[A] = edges[A] + 1
    edges[B] = edges[B] + 1

c = 0
for i in range(N):
    if (labels[i] == -1):
        s = []
        s.append(i)
        labels[i] = c
        while(len(s) != 0):
            u = s.pop()
            for i in range(len(follow[u])):
                if (labels[follow[u][i]] == -1):
                    labels[follow[u][i]] = c
                    s.append(follow[u][i])
        c += 1

groupV = [0]*(c+1)
for i in range(N):
    groupV[labels[i]] = groupV[labels[i]] + 1

for i in range(K):
    C,D = map(int,input().split())
    C = C-1
    D = D-1
    if (labels[C] != labels[D]) : continue
    edges[C] = edges[C] + 1
    edges[D] = edges[D] + 1

ans = ["0"]*N

for i in range(N):
    ans[i] = str(groupV[labels[i]] - 1 - edges[i])

print(" ".join(ans))
import math
while True:
    n=int(input())
    a=list(map(int,input().split()))
    if n==0:
        break
    else:
        m=sum(a)/float(n)
        print("{0:.8f}".format(math.sqrt(sum([(x-m)**2/n for x in a]))))

### FIXED CODE ###

import math
while True:
    n = int(input())
    if n==0: break
    s = list(map(int,input().split()))
    m = sum(s)/float(n)
    print("{0:.8f}".format(math.sqrt(sum([(x-m)**2 for x in s])/n)))
a,b,c,d,e=[int(input()) for i in range(5)]
a1=a//10
a2=a%10
if a2==0:
    a1-=1
    a2=10
b1=b//10
b2=b%10
if b2==0:
    b1-=1
    b2=10
c1=c//10
c2=c%10
if c2==0:
    c1-=1
    c2=10
d1=d//10
d2=d%10
if d2==0:
    d1-=1
    d2=10
n=e//10
m=e%10
if m==0:
    n-=1
    m=10
min1=min(a2,b2,c2,d2,m)
    ans=(a1+b1+c1+d1+n+4)*10+min1
print(ans)


### FIXED CODE ###

a,b,c,d,e=[int(input()) for i in range(5)]
a1=a//10
a2=a%10
if a2==0:
    a1-=1
    a2=10
b1=b//10
b2=b%10
if b2==0:
    b1-=1
    b2=10
c1=c//10
c2=c%10
if c2==0:
    c1-=1
    c2=10
d1=d//10
d2=d%10
if d2==0:
    d1-=1
    d2=10
n=e//10
m=e%10
if m==0:
    n-=1
    m=10
min1=min(a2,b2,c2,d2,m)
if a2==10 or b2==10 or c2==10 or d2==10 or m==10:
    ans=(a1+b1+c1+d1+n+4)*10+min1
else:
    ans=(a1+b1+c1+d1+n+4)*10+min1
print(ans)
N = int(input())

if N < 10:
    print(N)
elif 10 <= N and N < 100:
    print(9)
elif 100 <= N and N < 1000:
    print(N-90)
elif 1000 <= N and N < 10000:
    print(909)
elif 10000 <= N and N < 100000:
    print(N-9090)
elif 100000 == N:
    print(90909)

### FIXED CODE ###

A, B, C =map(int,input().split())
if C > A-B:
    print(C - (A-B))
else:
    print(0)
#create date: 2020-05-03 21:37

import sys
stdin = sys.stdin

import numpy as np

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()
    a = np.array(na())
    b = np.arange(1, n+1)
    #print(a, b)
    ans = 0
    for i in range(n):
        anow = a[i]
        j = i+anow+1
        if j < n:
            ans += sum(a[j:]== b[:n-j])
    print(ans)


if __name__ == "__main__":
    main()

### FIXED CODE ###

#create date: 2020-05-03 21:37

import sys
stdin = sys.stdin
from collections import defaultdict

import numpy as np

def ns(): return stdin.readline().rstrip()
def ni(): return int(ns())
def na(): return list(map(int, stdin.readline().split()))

def main():
    n = ni()
    a = np.array(na())
    b = np.arange(1, n+1)
    c = a + b
    d = b - a
    l = defaultdict(lambda: 0)
    ans = 0
    for ci in c:
        l[ci] += 1
    for di in d:
        ans += l[di]
    print(ans)


if __name__ == "__main__":
    main()
from collections import Counter
n = int(input())
s, t = Counter(int)
for _ in n:
    word = str(input())
    s[word] += 1
m = int(input())
for _ in m:
    word = str(input())
    s[word] -= 1
print(s.most_common(1))
    

### FIXED CODE ###

from collections import Counter, defaultdict
n = int(input())
s= []
t = defaultdict(int)
for _ in range(n):
    s.append(input())
u = Counter(s)
m = int(input())
for _ in range(m):
    word = input()
    t[word] -= 1
    if word in u.keys():
        u[word] -= 1

ans = u.most_common(1)[0][1]
t = sorted(t.items(), key=lambda x:x[1], reverse=True)[0][1]
t = max(t, 0)
print(max(ans,t))
import sympy

n = int(input())

ans = 0

for i in range(1,n+1):
    ans += i* sympy.divisor_count(i)

print(ans)

### FIXED CODE ###

N = int(input())
ans = 0
for i in range(1, N + 1):
    n = N // i  # 項数n
    cnt = (n * (2 * i + (n - 1) * i)) // 2  # 初項i, 項数n の等差数列の和の公式
    ans += cnt
print(ans)
from itertools import groupby

s = input()
k = int(input())

t = s * k
cont = [sum(1 for _ in it) for k, it in groupby(t)]

res = 0
for c in cont:
    if c != 1:
        res += c // 2

print(res)

### FIXED CODE ###

from itertools import groupby

s = input()
k = int(input())

cont = [sum(1 for _ in it) for k, it in groupby(s)]

if len(cont) == 1:
    res = len(s) * k // 2
else:
    res = k-1 if s[0] == s[-1] and cont[0] % 2 == 1 and cont[-1] % 2 == 1 else 0
    for c in cont:
        if c != 1:
            res += c // 2 * k

print(res)
# -*- coding: utf-8 -*-
import sys
from collections import deque
from collections import defaultdict

H,W=map(int, sys.stdin.readline().split())
S=[ sys.stdin.readline().strip() for _ in range(H) ]

D=[(1,0),(-1,0),(0,1),(0,-1)]

def bfs(start):
    Visit={}
    q=deque()
    q.append(start)
    Visit[start]=1
    L=defaultdict(lambda: 0)    #距離

    while q:
        fro_x,fro_y=q.popleft()
        for dx,dy in D:
            to_x=fro_x+dx
            to_y=fro_y+dy
            if 0<=to_x<H and 0<=to_y<W:
                if S[to_x][to_y]=="." and (to_x,to_y) not in Visit:
                    Visit[to_x,to_y]=1
                    L[(to_x,to_y)]=L[(fro_x,fro_y)]+1
                    q.append((to_x,to_y))

    return max(L.values())

ans=0
for h in range(H):
    for w in range(W):
        ans=max(ans,bfs((h,w)))

print ans


### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
from collections import deque
from collections import defaultdict
 
H,W=map(int, sys.stdin.readline().split())
S=[ sys.stdin.readline().strip() for _ in range(H) ]
 
D=[(1,0),(-1,0),(0,1),(0,-1)]
 
def bfs(start):
    Visit={}
    q=deque()
    q.append(start)
    L=defaultdict(lambda: float("inf")) 
    L[start]=0
 
    while q:
        fro_x,fro_y=q.popleft()
        for dx,dy in D:
            to_x=fro_x+dx
            to_y=fro_y+dy
            alt=L[(fro_x,fro_y)]+1
            if 0<=to_x<H and 0<=to_y<W:
                if S[to_x][to_y]=="." and alt<L[(to_x,to_y)]:
                    L[(to_x,to_y)]=alt
                    q.append((to_x,to_y))
    return max(L.values())
 
ans=0
for h in range(H):
    for w in range(W):
        if S[h][w]==".":
            ans=max(ans,bfs((h,w)))
print ans
a,b=map(int,input())
print('Even' if (a*b)&1==0 else 'Odd')

### FIXED CODE ###

a,b=map(int,input().split())
print('Even' if a*b%2==0 else 'Odd')
# coding: utf-8
# Your code here!
n,m=map(int,input().split())
a=[0]*(n+1)
b=[0]*(n+1)
f1=[]
f2=[]
for i in range(m):
    a[i],b[i]=map(int,input().split())
    if a[i]==1:
        f1.append(b[i])
    if b[i]==n:
        f2.append(i)
        

ans='IMPOSSIBLE'
for i in f2:
    if a[i] in f1:
        ans='POSSIBLE'
print(ans)


### FIXED CODE ###

# coding: utf-8
# Your code here!
import sys
def input():
    return sys.stdin.readline()
n,m=map(int,input().split())
a=[0]*(m+1)
b=[0]*(m+1)
c=[0]*(n+1)
f1=[]
f2=[]
for i in range(m):
    a[i],b[i]=map(int,input().split())
    if a[i]==1:
        c[b[i]]=1

ans='IMPOSSIBLE'
for i in range(m):
    if b[i]==n:
        if c[a[i]]==1:
            ans='POSSIBLE'
print(ans)
r=input()
if r<1200:
  print('ABC')
elif 1200<=r<2800:
  print('ARC')
else:
  print('AGC')

### FIXED CODE ###

r=int(input())
if r<1200:
  print('ABC')
elif 1200<=r and r<2800:
  print('ARC')
else:
  print('AGC')
n=int(input())
d=list(map(int,input().split()))
s=0
for i in range(n):
    for j in range(i+1:):
        s += i*j
print(s)

### FIXED CODE ###


n=int(input())
d=list(map(int,input().split()))
s=0
for i in range(n):
    for j in range(i+1,n):
        s += d[i]*d[j]
print(s)
from queue import deque

s = deque([i for i in input()])
Q = int(input())
state = 0
for _ in range(Q):
    q = input()
    if q[0] == '1':
        if state == 0:
            state = 1
        else:
            state = 0
    else:
        if q[2] == '1':
            if state == 0:
                s.appendleft(q[-1])
            else:
                s.append(q[-1])
        else:
            if state == 0:
                s.append(q[-1])
            else:
                s.appendleft(q[-1])

if state == 1:
    print(s[::-1])
else:
    print(s)


### FIXED CODE ###

from queue import deque

s = deque([i for i in input()])
Q = int(input())
state = 0
for _ in range(Q):
    q = input()
    if q[0] == '1':
        if state == 0:
            state = 1
        else:
            state = 0
    else:
        if int(q[2]) == 1:
            if state == 0:
                s.appendleft(q[-1])
            else:
                s.append(q[-1])
        elif int(q[2]) == 2:
            if state == 0:
                s.append(q[-1])
            else:
                s.appendleft(q[-1])

if state == 1:
    s.reverse()
print(''.join(s))
a,b = [int(x) for x in input.split()]

print(round((a/b),10))

### FIXED CODE ###

a,b = [int(x) for x in input().split()]
 
print(round((a/b),10))