Harryxun/stf_run huggingface dataset:
n = int(input(),10)
sort_list = list()

for i in range(0,n):
    sort_list.append(int(input(),10))

for i in range(1,n):
    
    for j in range(0,n):
        print(sort_list[j])
        if j is not n - 1:
            print(" ")
        else:
            print("\n")
    
    tmp = sort_list[i]
    j = i - 1
    while j >= 0 and sort_list[i] > v:
        sort_list[j+1] = sort_list[j]
        j--
    sort_list[j+1] = v




### FIXED CODE ###

import sys

n = input()
sort_list = list()

sort_list = map(int, raw_input().split())

for i in range(0,n):
    
    
    tmp = sort_list[i]
    j = i - 1
    while j >= 0 and sort_list[j] > tmp:
        sort_list[j+1] = sort_list[j]
        j = j - 1

    sort_list[j+1] = tmp


    for k in range(0,n):
        sys.stdout.write(str(sort_list[k]))
        if k is not n - 1:
            sys.stdout.write(" ")
        elif i is not n - 1:
            sys.stdout.write("\n")
            
print("")
from collections import defaultdict


class Graph:

    def __init__(self, N):
        self.graph = defaultdict(list)
        self.N = N
        self.memo = [-1] * (N+1)
        self.tovisit = set(range(1, N+1))

    def add_edge(self, x, y):
        self.graph[x].append(y)

    def _longest_path(self, node):
        if self.memo[node] == -1:
            res = 0
            for y in self.graph[node]:
                res = max(res, 1 + self._longest_path(y))

            self.memo[node] = res
            self.tovisit.discard(node)

        return self.memo[node]

    def longest_path(self):
        while self.tovisit:
            self._longest_path(self.tovisit.pop())

        res = 0
        for i in range(1, self.N+1):
            res = max(res, self.memo[i])

        return res


def main():

    N, M = map(int, input().split())
    graph = Graph(N)
    for _ in range(M):
        x, y = map(int, input().split())
        graph.add_edge(x, y)

    ans = graph.longest_path()
    print(ans)


if __name__ == "__main__":
    main()


### FIXED CODE ###

import sys
sys.setrecursionlimit(100000)

from collections import defaultdict



class Graph:

    def __init__(self, N):
        self.graph = defaultdict(list)
        self.N = N
        self.memo = [-1] * (N+1)
        self.tovisit = set(range(1, N+1))

    def add_edge(self, x, y):
        self.graph[x].append(y)

    def _longest_path(self, node):
        if self.memo[node] == -1:
            res = 0
            for y in self.graph[node]:
                res = max(res, 1 + self._longest_path(y))

            self.memo[node] = res
            self.tovisit.discard(node)

        return self.memo[node]

    def longest_path(self):
        while self.tovisit:
            self._longest_path(self.tovisit.pop())

        res = 0
        for i in range(1, self.N+1):
            res = max(res, self.memo[i])

        return res


def main():

    N, M = map(int, input().split())
    graph = Graph(N)
    for _ in range(M):
        x, y = map(int, input().split())
        graph.add_edge(x, y)

    ans = graph.longest_path()
    print(ans)


if __name__ == "__main__":
    main()
n = input()
l = list(map(int,input().split()))
diff = []
for t in range(1,n):
  diff.append(abs(sum(l[:t])-sum(l[t:]))))
print(min(diff))

### FIXED CODE ###

n = int(input())
l = list(map(int,input().split()))
diff = []
for t in range(1,n):
    diff.append(abs(sum(l[:t])-sum(l[t:])))
print(min(diff))
n,k=map(int,input().split())


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

ar=[-1 for i in range(n+1)]
p=1
h=[]
go=0


for i in range(1,k+1):
    
    
    
    

    ar[p]=i
    p=a[p-1]
    
    if ar[p]>0:
        j=ar[p]
        amari=(k-i-1)%(i-j)
        p=h[j+amari]
        go=1
        break

if go==1:
    p=ar.index(j+amari)
    p=a[p-1]


print(p)


### FIXED CODE ###

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


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

ar=[-1 for i in range(n+1)]
p=1

go=0


for i in range(1,k+1):
    
    
    
    

    ar[p]=i-1
    p=a[p-1]
    
    if ar[p]>0:
        j=ar[p]
        amari=(k-i)%(i-j)
        
        go=1
        break

if go==1:
    p=ar.index(j+amari)
    
    


print(p)
# -*- coding: utf-8 -*-
import sys
lines = sys.stdin.readlines()
l = 0
while not ("-" in lines[l]):
 s = lines[l].replace('\n','')
 n = int(lines[l+1])
 l += 2
 t = sum(map(int, lines[l, l+n])) % len(s)
 print s[t:]+s[:t]
 l += n

### FIXED CODE ###

# -*- coding: utf-8 -*-
import sys
lines = sys.stdin.readlines()
l = 0
while not ("-" in lines[l]):
 s = lines[l].replace('\n','')
 n = int(lines[l+1])
 l += 2
 t = sum(map(int, lines[l:l+n])) % len(s)
 print s[t:]+s[:t]
 l += n
import math

n = int(input())
tmp_list = []

for i in range(1, int(math.sqrt(n)), 1):
    if(n%i==0):
        tmp_list.append(i)

i = tmp_list[len(tmp_list)-1]
j = n//i

print(i+j-2)

### FIXED CODE ###

import math

n = int(input())
tmp_list = []

for i in range(1, int(math.sqrt(n))+1, 1):
    if(n%i==0):
        tmp_list.append(i)

i = tmp_list[len(tmp_list)-1]
j = n//i

print(i+j-2)
N, K = int(input().split())

# N = 1000000000000000000
# K = 1
amari = N%K
bmari = abs(amari-K)
if amari >= bmari:
    print(bmari)
else:
    print(amari)

### FIXED CODE ###

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

amari = N%K
bmari = abs(amari-K)
if amari >= bmari:
    print(bmari)
else:
    print(amari)
n, m, k = map(int, input().split())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
a.append(k+1)
b.append(k+1)
ia = 0
ib = 0
count = 0

for i in range(n + m + 1):
  if (a[ia] < b[ib]):
    if(a[ia] > k):
      print(count)
      break
      else:
        k -= a[ia]
        ia += 1
        count += 1
        else:
          if(b[ib] > k):
            print(count)
            break
            else:
              k -= b[ib]
              ib += 1
              count += 1


### FIXED CODE ###

a = int(input())
ans = a * (1 + a + a * a)
print(ans)
x, y = map(int,input().split())
while True 
  if x >= y:
    x %= y
  else
    y %= x
  if x == y:
    print(x)
    break

### FIXED CODE ###

x, y = map(int,input().split())
while True:
  if x >= y:
    x %= y
  else:
    y %= x
  if x == 0 or y == 0:
    print(x+y)
    break
from itertools import product

X, Y, Z, K = map(int, input().split())
A = sorted([int(i) for i in input().split()])
B = sorted([int(i) for i in input().split()])
C = sorted([int(i) for i in input().split()])

def solve():
  AB = []
  for a in A:
    for b in B:
      AB.append(a + b)

  AB.sort(reversed=True)
  AB = AB[:min(3001, X * Y * Z + 1)]
  ABC = []
  for ab in AB:
    for c in C:
      ABC.append(ab + c)
  ABC.sort(reverse=True)
  print(ABC[:K], sep='\n')

solve()


### FIXED CODE ###

X, Y, Z, K = map(int, input().split())
A = list(map(int, input().split()))
B = list(map(int, input().split()))
C = list(map(int, input().split()))

A.sort(reverse=True)
B.sort(reverse=True)
C.sort(reverse=True)

AB = []
for a in A:
  for b in B:
    AB.append(a + b)

AB.sort(reverse=True)
AB = AB[:min(3001, X * Y * Z + 1)]
ABC = []
for c in C:
  for ab in AB:
    ABC.append(ab + c)
ABC.sort(reverse=True)
for i in range(K):
  print(ABC[i])
N, K = map(int, input().split())
l = list(map(int, input().split()))
l.sort(reverse=True)
ans = 0

for i in range(N):
    if K != 0:
        ans += l[i]
        K -= 1
    elif K == 0:
        break
print(ans)


### FIXED CODE ###

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

if A % 3 == 0 or B % 3 == 0 or (A+B) % 3 == 0:
    print("Possible")

else:
    print("Impossible")
import math

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

def lcm(a,b):
    return (a*b) // math.gcd(a, b)
    
print(lcm(a,b))

### FIXED CODE ###

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

#a,bの最大公約数
def gcd(a, b):
    while b:
        a, b = b, a % b
    return a

#a,bの最小公倍数
def lcm(a, b):
    return a * b // gcd (a, b)
    
print(lcm(a,b))
n,k = map(int, input().split())
s = list(x for x in input())
ans = 0

if s[0] == 'R':
  s.insert(0, 'L')
if s[-1] == 'R':
  s.append('L')
s.append(0)
l = []
r = []


for i in range(len(s)-1):
  if s[i] == 'L':
    l.append(i)
    if s[i+1] == 'L':
      ans += 1
      
for i in range(len(l)-1):
  r.append(l[i+1] - l[i] - 1)

r.sort(reverse = True)

for i in range(k):
  if r[i] != 0:
    ans += r[i] + 1

if ans == n:
  print(n-1)
else:
  print(ans)


### FIXED CODE ###

n,k = map(int, input().split())
s = input()
ans = 0
for i in range(len(s)-1):
	if s[i] == s[i+1]:
		ans += 1
ans += 2*k
 
print(min(ans, n-1))
import sys
import numpy as np

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

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_nl = lambda: list(map(int, readline().split()))
in_na = lambda: map(int, read().split())
in_s = lambda: readline().rstrip().decode('utf-8')


def main():
    H, W = in_nn()
    a = np.array(read().split(), np.int32).reshape((H, W))

    odd_count = np.count_nonzero(a % 2 == 1)
    if odd_count % 2 == 1:
        odd_count -= 1

    count = 0
    x, y = 0, 0
    px, py = -1, -1
    odd_f = False

    ans = []
    while True:

        if odd_f:
            ans.append((py + 1, px + 1, y + 1, x + 1))
            if a[y][x] % 2 == 1:
                odd_f = False
        else:
            if a[y][x] % 2 == 1:
                odd_f = True

        px, py = x, y
        if a[y][x] % 2 == 1:
            count += 1
            if count >= odd_count:
                break

        if y % 2 == 0:
            if x == W - 1:
                y += 1
            else:
                x += 1
        else:
            if x == 0:
                y += 1
            else:
                x -= 1

    print(len(ans))
    for a in ans:
        print(*a)


if __name__ == '__main__':
    main()


### FIXED CODE ###

import sys
import numpy as np

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

in_n = lambda: int(readline())
in_nn = lambda: map(int, readline().split())
in_nl = lambda: list(map(int, readline().split()))
in_na = lambda: map(int, read().split())
in_s = lambda: readline().rstrip().decode('utf-8')


def main():
    H, W = in_nn()
    a = np.array(read().split(), np.int32).reshape((H, W))

    odd_count = np.count_nonzero(a % 2 == 1)
    if odd_count % 2 == 1:
        odd_count -= 1

    count = 0
    x, y = 0, 0
    px, py = -1, -1
    odd_f = False

    ans = []
    while True:

        if odd_f:
            ans.append((py + 1, px + 1, y + 1, x + 1))
            if a[y][x] % 2 == 1:
                odd_f = False
        else:
            if a[y][x] % 2 == 1:
                odd_f = True

        px, py = x, y
        if a[y][x] % 2 == 1:
            count += 1
            if count >= odd_count:
                break

        if y % 2 == 0:
            if x == W - 1:
                y += 1
            else:
                x += 1
        else:
            if x == 0:
                y += 1
            else:
                x -= 1

        if y >= H:
            break

    print(len(ans))
    for a in ans:
        print(*a)


if __name__ == '__main__':
    main()
N = int(input())
A = sorted((map(int,input().split())))
A_Max = A[-1]
B = [True]*A_Max+1

for i in range(N):
    if B[A[i]]:
        for j in range(2,A_Max):
            if A[i] * j > A_Max:
                break
            B[A[i] * j] = False

ans = 0
for i in range(N):
    if B[A[i]]:
            B[A[i]] = False
            ans += 1

print(ans)



### FIXED CODE ###

N = int(input())
A = sorted((map(int,input().split())))
a_Max = A[-1]
B = [0]*a_Max

for a in A:
    if B[a-1] == 0:
        B[a-1] = 1
        for j in range(2,a_Max+1):
            if a*j > a_Max:
                break
            B[a*j-1] = 2
    elif B[a-1] == 1:
        B[a-1] = 2
            
ans = 0
for b in B:
    if b == 1:
        ans += 1

print(ans)
n = int(input())
a = list(map(int, input().split()))
import(sys)

cnt = [0] * n
for x in a:
  a[x] += 1

ok = True
for i in range(0, n):
  if n % 2 == 1 && i % 2 == 0:
    if i == 0 && cnt[i] != 1 or cnt[i] != 2:
      ok = False
  elif n % 2 == 0 && i % 2 == 0:
    if cnt[i] != 2:
      ok = False

if not ok:
  print(0)
else:
  res = 1
  for i in range(0, n // 2):
    res *= 2
    res %= 1000000007
print(res)

### FIXED CODE ###

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


cnt = [0] * n
for x in a:
  cnt[x] += 1

ok = True
for i in range(0, n):
  if n % 2 == 1 and i % 2 == 0:
    if i == 0 and cnt[i] != 1 or i > 0 and cnt[i] != 2:
      ok = False
  elif n % 2 == 0 and i % 2 == 1:
    if cnt[i] != 2:
      ok = False

if not ok:
  print(0)
else:
  res = 1
  for i in range(0, n // 2):
    res *= 2
    res %= 1000000007
  print(res)
w,h,x,y = list(map(int,input().split()))
ans = 0
if x == 0 and y == 0:
    print(h * w /2 , 0)
elif x == 0:
    print(h * w /2,0)
elif y == 0:
    print(h * w / 2, 0)
else:
    if x == w /2 and y == h / 2:
        print(h * w /2,1)
    else:
         
        print(h * w /2,0)


### FIXED CODE ###

x ,a = list(map(int,input().split()))

if x < a:
    print(0)
else:
    print(10)
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 hq.size() < k:
      heapq.push(hq,temp)
    else:
      heapq.heapreplace[hq,temp]
for i in range(k):
  print(hq[k-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)
N, M = map(int, input().split())
digits = [-1 for _ in range(N+1)]
for __ in range(M):
  digit, num = map(int, input().split())
  if digit = 1 and num == 0:
    print(-1)
    exit()
  elif digits[digit] != -1 and num != digits[digit]:
    print(-1)
  else:
    digits[digit] = num
answer = 0
for i in range(1, N+1):
  if digits[i] == -1:
    if i == 1:
      answer += 1*10*(N-i)
  else:
    answer += digits[i]*10*(N-i)
print(answer)

### FIXED CODE ###

N, M = map(int, input().split())
digits = [-1 for _ in range(N+1)]
for __ in range(M):
  digit, num = map(int, input().split())
  if digit == 1 and num == 0 and N != 1:
    print(-1)
    exit()
  elif digits[digit] != -1 and num != digits[digit]:
    print(-1)
    exit()
  else:
    digits[digit] = num
answer = 0
for i in range(1, N+1):
  if digits[i] == -1:
    if i == 1 and N != 1:
      answer += 1*10**(N-i)
  else:
    answer += digits[i]*10**(N-i)
print(answer)
import math
from sys import stdin
input = stdin.readline

n = int(input())
ans=[]
for i in range(1,round(math.sqrt(n))):
    if n%i==0:
        tmp=max(len(str(i)),len(str(n//i)))
        ans.append(tmp)
print(min(ans))

### FIXED CODE ###

import math
from sys import stdin
input = stdin.readline

n = int(input())
ans=[1145141919]
for i in range(1,round(math.sqrt(n))+1):
    if n%i==0:
        tmp=max(len(str(i)), len(str(n//i)))
        ans.append(tmp)
print(min(ans))
import sys

lines = []
for line in sys.stdin:
    lines.append(line.strip().split(','))

field = [[0 for i in range(10)] for j in range(10)]

def drop(x, y, z):
    if z==1:
        for i in range(-1,2):
            for j in range(-1,2):
                if abs(i)+abs(j)<2 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    elif z==2:
        for i in range(-1,2):
            for j in range(-1,2):
                if 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1
    else:
        for i in range(-2,3):
            for j in range(-2,3):
                if abs(i)+abs(j)<3 and 0<=y+j<=10 and 0<=x+i<=10:
                    field[y+j][x+i] += 1



for line in lines:
    x,y,z = map(int, line)
    print(x,y,z)
    drop(x,y,z)

n = 0
m = 0
for f in field:
    for e in f:
        if e > m:
            m = e
        if e==0:
            n+=1




### FIXED CODE ###

import sys

lines = []
for line in sys.stdin:
    lines.append(line.strip().split(','))

field = [[0 for i in range(10)] for j in range(10)]

def drop(x, y, z):
    if z==1:
        for i in range(-1,2):
            for j in range(-1,2):
                if abs(i)+abs(j)<2 and 0<=y+j<=9 and 0<=x+i<=9:
                    field[y+j][x+i] += 1
    elif z==2:
        for i in range(-1,2):
            for j in range(-1,2):
                if 0<=y+j<=9 and 0<=x+i<=9:
                    field[y+j][x+i] += 1
    else:
        for i in range(-2,3):
            for j in range(-2,3):
                if abs(i)+abs(j)<3 and 0<=y+j<=9 and 0<=x+i<=9:
                    field[y+j][x+i] += 1



for line in lines:
    x,y,z = map(int, line)
    drop(x,y,z)

n = 0
m = 0
for f in field:
    for e in f:
        if e > m:
            m = e
        if e==0:
            n+=1

print(n)
print(m)
#5問目
import math
from functools import reduce
def lcm_base(x, y):
    return (x * y) // math.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
T = []
for i in range(N):
    t = int(input())
    T.append(t)
    
print(lcm_list(T))

### FIXED CODE ###

#5問目
import fractions
from functools import reduce
def lcm_base(x, y):
    return (x * y) // fractions.gcd(x, y)

def lcm_list(numbers):
    return reduce(lcm_base, numbers, 1)

N = int(input())
T = []
for i in range(N):
    t = int(input())
    T.append(t)
    
print(lcm_list(T))
import math
from functools import reduce
N = int(input())
A = list(map(int, input().split()))
num = reduce(math.gcd, A)
print(num)


### FIXED CODE ###

def gcd(a, b):
    while b:
        a, b = b, a % b
    return a


N = int(input())
A = list(map(int, input().split()))
num = A[0]
for i in range(N):
    num = gcd(num, A[i])
print(num)
# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
s = int(input())
alpha = [chr(i) for i in range(97, 97+26)]
for c in alpha:
    if c in s:
        continue
    else:
        print(c)
        break


### FIXED CODE ###

# python template for atcoder1
import sys
sys.setrecursionlimit(10**9)
input = sys.stdin.readline
s = input()
alpha = [chr(i) for i in range(97, 97+26)]
for c in alpha:
    if c in s:
        continue
    else:
        print(c)
        exit()
print("None")
n = int(input())
coordinates = []
distance = []

for i in range(n):
    coordinate = list(map(int, input().split()))
    coordinates.append(coordinate)
    distance.append(abs(coordinate[0]) + abs(coordinate[1]))

p = distance[0] & 1
for dist in distance:
    if p != dist & 1:
        print(-1)
        exit()

m = max(distance)
print(m)
print("1" + " 1" * (m - 1))

for i in range(n):
    result = "RL" * ((m - distance[i]) // 2)
    if coordinates[i][0] < 0:
        result += "L" * -coordinates[i][0]
    else:
        result += "R" * coordinates[i][0]
    if coordinates[i][1] < 0:
        result += "D" * -coordinates[i][1]
    else:
        result += "U" * coordinates[i][1]
    print(result)

### FIXED CODE ###

from functools import reduce
import math

n = int(input())
coord = [tuple(map(int, input().split())) for i in range(n)]

# parity check and get max
x, y = coord[0]
p = (x + y) & 1
limit = 0
for x, y in coord:
    if p != (x + y) & 1:
        print(-1)
        exit()
    lim = abs(x) + abs(y)
    if lim > limit:
        limit = lim

limit = round(math.log2(limit))
if p == 1:
    d = [2 ** i for i in reversed(range(limit + 1))]
else:
    d = [1] + [2 ** i for i in reversed(range(limit + 1))]

print(len(d))
print(reduce((lambda acc, dist: str(acc) + " " + str(dist)), d))

for x, y in coord:
    u = x + y
    v = x - y

    command = ""
    for i in range(len(d)):
        if u >= 0 and v >= 0:
            command += "R"
            u -= d[i]
            v -= d[i]
        elif u >= 0 > v:
            command += "U"
            u -= d[i]
            v += d[i]
        elif u < 0 <= v:
            command += "D"
            u += d[i]
            v -= d[i]
        elif u < 0 and v < 0:
            command += "L"
            u += d[i]
            v += d[i]

    print(command)
import sys
input = sys.stdin.readline
N,Q=map(int,input().split())
ans=[0]*N
ki=[[] for _ in range(N)]
for i in range(N-1):
 a,b=map(int,input().split())
 ki[a-1].append(b-1)
 ki[b-1].append(a-1)
for i in range(Q):
 p,q=map(int,input().split())
 ans[p-1]+=q
# dfs
from collections import deque
stack =deque([0])
visited = ["False"] * N
while stack:
 ne = stack.popleft()
 if visited[ne] == "False":
  visited[ne] = "True"
  for j in ki[ne]:
   if visited[j] == "False":
    ans[j]+=ans[ne]
    stack.append(j)
print(*ans)


### FIXED CODE ###

N=input()
L=len(N)
ans=[[0 for e in range(2)] for f in range(L)]
k=int(N[L-1])
ans[0][0]=k
ans[0][1]=10-k
if L>1:
 for i in range(1,L):
  k=int(N[L-1-i])
  ans[i][0]=min(ans[i-1][0]+k,ans[i-1][1]+k+1)
  ans[i][1]=min(ans[i-1][0]+10-k,ans[i-1][1]+10-k-1)
print(min(ans[L-1][0],ans[L-1][1]+1))
S = input()
ACGT = ["A","C","G","T"]

ans = 0 
ans_lis = []

for i in range(len(S)):
    if S[i] in ACGT:
        ans = ans + 1 
    elif S[i] not in ACGT:
        ans_lis.append(ans)
        ans = 0 

print(max(ans_lis))

### FIXED CODE ###

S = input()
ACGT = ["A","C","G","T"]

ans = 0 
ans_lis = [0]

for i in range(len(S)):
    if S[i] in ACGT:
        ans = ans + 1 
        if i == (len(S)-1):
            ans_lis.append(ans)
    elif S[i] not in ACGT:
        ans_lis.append(ans)
        ans = 0 

print(max(ans_lis))
M,D = map(int,input().split())
​
count = 0
if M < 4 or D < 22:
    print(count)
else :
    for m in range(4,M+1):
        for da in range(2,10):
            if da > m:
                break
            db = int(m/da)
#             if m == M and da == int(D/10) and db > D%10:
#                 break
#             if db < 2:
#                 continue
            if da*10+db <= D and da*db == m:
                count += 1
​
print(count)

### FIXED CODE ###

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

count=0
for i in range(1,M+1):
    for j in range(22,D+1):
        temp=str(j)
        if temp[0] >="2" and temp[1]>="2":
            if int(temp[1]) * int(temp[0])==i:
                count+=1

print(count)
# coding: UTF-8
import math
N=int(input())
a=int(input())
for i in range(N-1):
    b=int(input())
    a=a*b//math.gcd(a, b)
print(int(a))

### FIXED CODE ###

# coding: UTF-8
from fractions import gcd
N=int(input())
a=int(input())
for i in range(N-1):
    b=int(input())
    a=a*b//gcd(a, b)
print(int(a))
a = [i ** 2 for i in range(3, sqrt(100100)+1)]
b, c = input().split()
print(int(b+c) in a and 'Yes' or 'No')


### FIXED CODE ###

a = [i**2 for i in range(4, 334)]
b,c = input().split()
print(int(b+c) in a and 'Yes' or 'No')