Harryxun/stf_run huggingface dataset:
S = input()

la = [0]

for i in range(len(S)):
    for j in range(len(S)-i):
        ans = 0
        while S[i+j-1] == "A" or S[i+j-1] == "C" or S[i+j-1] == "G" or S[i+j-1] == "T":
            ans += 1
            j += 1
            la.append(ans)

print(max(la))

### FIXED CODE ###

S = input()
N = len(S)

s = list()
for i in range(N):
    if S[i] == "A" or S[i] == "T" or S[i] == "G" or S[i] == "C":
        s.append(1)
    else:
        s.append(0)
#print(s)

lz = list()
cnt = 0
for i in range(N):
    if s[i] == 1:
        if cnt == 0:
            cnt = 1
        else:
            cnt += 1
    else:
        lz.append(cnt)
        cnt = 0
lz.append(cnt)
print(max(lz))
import sys
S = input()
T = input()
ans = 'UNRESTORABLE'
if S.count(T) != 0:
    S = S.replace('?', 'a')
    print(S)
    sys.exit()

for i in range(len(S) - len(T) + 1):
    tmp = True
    s = i
    e = i + len(T)
    for j in range(len(T)):
        if S[i + j] != '?' and\
            S[i + j] != T[j]:
            tmp = False
            break

    if tmp:
        break
    else:
        s = -1
        e = -1
if s == -1:
    print(ans)
else:
    ans = S.replace('?', 'a')
    ans = ans[:s] + T + ans[e:]
    print(ans)

### FIXED CODE ###

import sys
S = input()
T = input()
ans = 'UNRESTORABLE'

if len(S) < len(T):
    print(ans)
    sys.exit()

if len(S) < len(T):
    print(ans)
    sys.exit()

tmp = True
anss = -1
anse = -1
for i in range(len(S) - len(T) + 1):
    tmp = True
    s = i
    e = i + len(T)
    for j in range(len(T)):
        if S[i + j] != '?' and\
            S[i + j] != T[j]:
            tmp = False
            break

    if tmp:
        anss = i
        anse = i + len(T)

if anss == -1:
    print(ans)

else:
    ans = S.replace('?', 'a')
    ans = ans[:anss] + T + ans[anse:]
    print(ans)
s = input()
op = ['','+']
if len(s) == 1:
    print(s)
else:
    s = s + 'X'*(10 -len(s))
    ans = []
    for a in op:
        for b in op:
            for c in op:
                for d in op:
                    for e in op:
                        for f in op:
                            for g in op:
                                for h in op:
                                    for i in op:
                                        　　　ans.append(s[0]+a+s[1]+b+s[2]+c+s[3]+d+s[4]+e+s[5]+f+s[6]+g+s[7]+h+s[8]+i+s[9])
    for i in range(len(ans)):
        for j in range(len(ans[i])):
            if ans[i][j] == 'X':
                if ans[i][j-1] == '+':
                    ans[i] = ans[i][:j-1]
                else:
                    ans[i] = ans[i][:j]
                break
    sums = 0
    for i in set(ans):
        sums += eval(i)
    print(sums)


### FIXED CODE ###

s = input()
op_cnt = len(s) - 1
ans = []
for i in range(2**op_cnt):
    op = ['']*op_cnt
    for j in range(op_cnt):
        if ((i >> j) & 1):
            op[op_cnt - 1 - j] = '+'
    f = s[0]
    for p, q in zip(op, s[1:]):
        f += p + q
    ans.append(f)
sums = 0
for i in ans:
    sums += eval(i)
print(sums)
l, n = map(int, input().split())
s = [input() for _ in range(n)]
s.sort()
print("".join(s))

### FIXED CODE ###

N, _ = [int(x) for x in input().split()]
S = sorted([input() for _ in range(N)])
print(''.join(S))
# coding:utf-8
# Doubly Linked List


def main():

    n = int(input())
    ans = ""
    dll = []
    for _ in range(n):
        operation = input().split()
        command = operation[0]
        if len(command) == 6:
            key = str(operation[1])
            if command == "insert":
                dll.insert(0, key)
            else:
                dll.remove(key)

        else:
            if command[6] == 'F':
                dll.pop(0)
            else:
                dll.pop(-1)

    print(' '.join(dll))

if __name__ == "__main__":
    main()

### FIXED CODE ###

# coding:utf-8
# Doubly Linked List

from collections import deque

def main():

    n = int(input())
    dll = deque()

    for _ in range(n):
        operation = input().split(' ')
        if operation[0] in ["insert", "delete"]:
            key = operation[1]
            if operation[0] == "insert":
                dll.appendleft(key)
            else:
                try:
                    dll.remove(key)
                except:
                    pass

        else:
            if operation[0][6] == 'F':
                dll.popleft()

            else:
                dll.pop()

    print(' '.join(dll))

if __name__ == "__main__":
    main()
N = int(input())
result = 0
for i in range(1, N+1)
    result += i
print(result)

### FIXED CODE ###

m = int(input())
result = 0
for i in range(1, m+1):
    result += i
print(result)
import numpy as np
def main():
    ttt = []
    n = int(input())
    e = [list(map(int, input().split())) for _ in range(n)]
    #e = [[int(i) for i in input().split()] for i in range(int(input()))]
    #n = 3
    #e = [[21,-11],[81234,94124,52141]]
    for j in range(n):
        t = e[0][0] - e[1][j]*0.006
        tt = abs(e[0][1] - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()

### FIXED CODE ###

import numpy as np
def main():
    ttt = []
    n = int(input())
    N, M = map(int, input().split())
    e = list(map(int, input().split()))
    #e = [[int(i) for i in input().split()] for i in range(int(input()))]
    #n = 3
    #e = [[21,-11],[81234,94124,52141
    for j in range(n):
        t = N - e[j]*0.006
        tt = abs(M - t)
        ttt.append(tt)
    ttt = np.array(ttt)
    print(np.argmin(ttt)+1)
main()
s=input()
a=s[0]
b=s[-1]
m=len(s)-2
print(a+m+b)

### FIXED CODE ###

s=input()
a=s[0]
b=s[-1]
m=str(len(s)-2)
print(a+m+b)
#!/usr/bin/env python3

import sys
from IPython import embed

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

A = []
for i in range(0, Q):
  A.append(int(input()))

wins = [0] * N
for i in A:
  wins[i - 1] = wins[i - 1] + 1

# sys.stdin = open('/dev/tty')
# embed()

for i in range(0, N):
  score = K - Q + wins[i]
  if score > 0:
    print("Yes")
  else:
    print("No")


### FIXED CODE ###

#!/usr/bin/env python3

import sys
# from IPython import embed

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

A = []
for i in range(0, Q):
  A.append(int(input()))

wins = [0] * N
for i in A:
  wins[i - 1] = wins[i - 1] + 1

# sys.stdin = open('/dev/tty')
# embed()

for i in range(0, N):
  score = K - Q + wins[i]
  if score > 0:
    print("Yes")
  else:
    print("No")
N = input()
S = input()
T = input()

Q = ""
for i in range (N-1):
  Q = Q + S[i] + T[i]
  
 print(Q)

### FIXED CODE ###

N = int(input())
S,T = input().split()
 
Q = ""
for i in range (N):
  Q = Q + S[i] + T[i]
  
print(Q)
n = int(input())
res = list(map(int, input().split()))
ans = 0 
for x in res:
  ans += 1/res
print(1/ans)

### FIXED CODE ###

n = int(input())
res = list(map(int, input().split()))
ans = 0 
for x in res:
  ans += 1/x
print(1/ans)
s UnionFind(object):

    def __init__(self, n):
        self.n = n
        self.par = list(range(n))
        self.rank = [1] * n

    def is_same(self, a, b):
        return self.root(a) == self.root(b)

    def root(self, x):
        if self.par[x] == x:
            return x
        self.par[x] = self.root(self.par[x])
        return self.par[x]

    def unite(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        if self.rank[x] > self.rank[y]:
            self.par[y] = x
        elif self.rank[x]  < self.rank[y]:
            self.par[x] = y
        else:
            self.par[y] = x
            self.rank[x] += 1


N = int(input())
X = []
Y = []
for i in range(N):
    x, y = map(int, input().split())
    X.append((x, i))
    Y.append((y, i))

X = sorted(X)
Y = sorted(Y)
graph = []
for i in range(N - 1):
    graph.append((X[i + 1][0] - X[i][0], X[i][1], X[i + 1][1]))
    graph.append((Y[i + 1][0] - Y[i][0], Y[i][1], Y[i + 1][1]))

graph.sort()
uf = UnionFind(N)

total_cost = 0
for cost, a, b in graph:
    if not uf.is_same(a, b):
        uf.unite(a, b)
        total_cost += cost

print(total_cost)


### FIXED CODE ###

class UnionFind(object):

    def __init__(self, n):
        self.n = n
        self.par = list(range(n))
        self.rank = [1] * n

    def is_same(self, a, b):
        return self.root(a) == self.root(b)

    def root(self, x):
        if self.par[x] == x:
            return x
        self.par[x] = self.root(self.par[x])
        return self.par[x]

    def unite(self, x, y):
        x = self.root(x)
        y = self.root(y)
        if x == y:
            return
        if self.rank[x] > self.rank[y]:
            self.par[y] = x
        elif self.rank[x]  < self.rank[y]:
            self.par[x] = y
        else:
            self.par[y] = x
            self.rank[x] += 1


N = int(input())
X = []
Y = []
for i in range(N):
    x, y = map(int, input().split())
    X.append((x, i))
    Y.append((y, i))

X = sorted(X)
Y = sorted(Y)
graph = []
for i in range(N - 1):
    graph.append((X[i + 1][0] - X[i][0], X[i][1], X[i + 1][1]))
    graph.append((Y[i + 1][0] - Y[i][0], Y[i][1], Y[i + 1][1]))

graph.sort()
uf = UnionFind(N)

total_cost = 0
for cost, a, b in graph:
    if not uf.is_same(a, b):
        uf.unite(a, b)
        total_cost += cost

print(total_cost)
# input
n = int(input())
A = list(map(int, input().split()))

# 偶数番目が＋
A_even = A
S_even = 0
ans_even = 0
for i in range(n):
    if (S + A_even[i]) * ((-1) ** (i - 1)) > 0:
        continue
    ans_even += S + A_even[i] + 1
    A_even[i] = (-1) ** (i - 1) - S
    S = (-1) ** (i - 1)

# 奇数番目が＋
A_odd = A
S_odd = 0
ans_odd = 0
for i in range(n):
    if (S + A_odd[i]) * ((-1) ** i) > 0:
        continue
    ans_odd += S + A_odd[i] + 1
    A_odd[i] = (-1) ** i - S
    S = (-1) ** i

ans = min(ans_even, ans_odd)

print(ans)

### FIXED CODE ###

# input
n = int(input())
A = list(map(int, input().split()))

# 偶数番目が＋
A_even = A[:]
S_even = 0
ans_even = 0
for i in range(n):
    if (S_even + A_even[i]) * ((-1) ** (i - 1)) > 0:
        S_even += A_even[i]
        continue
    A_even[i] = (-1) ** (i - 1) - S_even
    ans_even += abs(A[i] - A_even[i])
    S_even = (-1) ** (i - 1)

# 奇数番目が＋
A_odd = A[:]
S_odd = 0
ans_odd = 0
for i in range(n):
    if (S_odd + A_odd[i]) * ((-1) ** i) > 0:
        S_odd += A_odd[i]
        continue
    A_odd[i] = (-1) ** i - S_odd
    ans_odd += abs(A[i] - A_odd[i])
    S_odd = (-1) ** i

ans = int(min(ans_even, ans_odd))

print(ans)
N = int(input())
S = input()
  
co = 0
index =0
n =[]
str = ""

for i in range(N):
  index=str.find(S[i])
  if index == -1 :
    str += S[i]
    n.append(2)
  else :
    n[i]++

co = 1
for i in range(len(n)):
  co = co * n[i]
co -= 1

print(co % 1000000007)

### FIXED CODE ###

N = int(input())
S = input()
  
co = 0
index =0
n =[]
str = ""

for i in range(N):
  index=str.find(S[i])
  if index == -1 :
    str += S[i]
    n.append(2)
  else :
    n[index] += 1

co = 1
for i in range(len(n)):
  co = co * n[i]
co -= 1

print(co % 1000000007)
s = input()
count_dic = {}
for a in s:
  if not a in count_dic:
    count_dic[a] = 1
  else:
    count_dic[a] += 1

  for v in count_dic.values():
    if v != 2:
      return False
  return True

### FIXED CODE ###

s = input()
sorted_s = sorted(s)
if sorted_s[0] == sorted_s[1] and sorted_s[1] != sorted_s[2] and sorted_s[2] == sorted_s[3]:
    print("Yes")
else:
    print("No")
n,k=map(int,input().split())
a=list(map(int,input().split()))
now=a[0]
his=[now]
for i in range(20):
  now=a[now-1]
#  print(now)
  if i==k-1:
    quit()
  if now in his:
    first=his.index(now)
    last=i
    break
  his.append(now)
print(his[first+(k-first)%(last-first+1)-1])

### FIXED CODE ###

n,k=map(int,input().split())
a=list(map(int,input().split()))
now=1
arr=[0]*(n+1)
for i in range(1,10**6):
  now=a[now-1]
  if i==k:
    print(now)
    quit()
  if arr[now]!=0:
    first=arr[now]
    break
  arr[now]=i
# print(arr)
cycle=max(arr)-first+1
# print(cycle)
mod=(k-first)%cycle
# print(mod)
ans=arr.index(first+mod)
print(ans)
N = int(input())
F = []
P = []
Pre = []
for i in range(N):
  F.append(list(map(int, input().split())))
for i in range(N):
  P.append(list(map(int, input().split())))

for loop in range(1,1024):
  rieki = 0
  Fnum = 0
  f = str(format(loop,"b")).rjust(10,"0") #自店の開店時間帯
  for i in range(N): # 全店舗に対し利益計算
    for j in range(10): # 店舗iと同時に営業する時間帯の数
      Fnum = Fnum + F[i][j] * int(f[j])
    #print("時間帯:{}".format(Fnum))
    rieki = rieki + P[i][Fnum] # P行列参照
  #print("rieki is {}".format(rieki))
  Pre.append(rieki) 
print(max(Pre))
  

### FIXED CODE ###

N = int(input())
F = []
P = []
Pre = []
for i in range(N):
  F.append(list(map(int, input().split())))
for i in range(N):
  P.append(list(map(int, input().split())))

for loop in range(1,1024):
  rieki = 0
  f = str(format(loop,"b")).rjust(10,"0") #自店の開店時間帯
  for i in range(N): # 全店舗に対し利益計算
    Fnum = 0
    for j in range(10): # 店舗iと同時に営業する時間帯の数
      Fnum = Fnum + F[i][j] * int(f[j])
    #print("loop:{},i:{},j:{}".format(loop,i,j))
    rieki = rieki + P[i][Fnum] # P行列参照
  Pre.append(rieki) 
print(max(Pre))
r = float(input())
z = r*r*pi
l = 2*r*3.141529
print('{} {}'.format(z,l))

### FIXED CODE ###

from math import pi
r = float(input())
z = r*r*pi
l = 2*r*pi
print('{} {}'.format(z,l))
n = int(input())
a = [int(input()) for _ in range(n)]

m = max(a)
b = a[:]
for idx,i in enumerate(a):
    if m != i:
        print(m)
    else:
        del b[idx]
        print(max(b))

### FIXED CODE ###

n = int(input())
a = [int(input()) for _ in range(n)]

b = sorted(a)
m = b[-1]
m1 = b[-2]

for i in a:
    if m != i:
        print(m)
    else:
        print(m1)
import sys
input = sys.stdin.readline

def main():
    n,m=map(int,input().split())
    a=sorted(list(map(int,input().split())))
    a.reverse()
    l,r=2*a[-1],2*a[0]
    x=(l+r)//2
    while l+1<r:
        s=0
        cnt,cnt2=0,0
        for i,A in enumerate(a):
            if A>=x:
                cnt+=2*(n-i)
                s+=2*(sum(a[i+1:])+(n-i-1)*A)+A*2
                cnt2+=1
            else:
                if A*2>=x:
                    cnt2+=1
                    s+=A*2
                for B in a[i+1:]:
                    if A+B>=x:
                        cnt+=2
                        s+=2*(A+B)
                    else:
                        break
        cnt+=cnt2
        if cnt>=m:
            l=x
        else:
            r=x
        x=(l+r)//2
    if cnt>m:
        print(s-(m-cnt)*l)
    else:
        print(s)
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
input = sys.stdin.readline
from bisect import bisect, bisect_left
from itertools import accumulate

def main():
    def check(x):
        count = 0
        for a in aaa:
            if x <= a:
                count += n
            else:
                count += n - bisect_left(aaa, x - a)
        return count >= m
    
    
    n, m = map(int, input().split())
    aaa = list(map(int, input().split()))
    aaa.sort()
    acc = [0] + list(accumulate(aaa))
    sum_a = acc[-1]
    
    l, r = 0, 200001
    while l + 1 < r:
        mid = (l + r) // 2
        if check(mid):
            l = mid
        else:
            r = mid
    
    # 合計がlより大きい組み合わせの和と組数を求める→Mに足りない分だけ合計がlの組を採用
    ans = 0
    count = 0
    for a in aaa:
        if l <= a:
            ans += sum_a + a * n
            count += n
        else:
            omit = bisect(aaa, l - a)
            if omit < n:
                ans += sum_a - acc[omit] + a * (n - omit)
                count += n - omit
    ans += l * (m - count)
    print(ans)
    
if __name__ == '__main__':
    main()
s=input()
t=input()

ss=list(s)
tt=list(t)
l=len(ss)    
count=0
y=-1
ind={}
flag1=0
for x in tt:
    ind[x]=[i for i, xx in enumerate(ss) if xx == x]
    if ind[x]==[]:
        flag1=1

if flag1==0:    
    for x in tt:
        for z in ind[x]:
            if z>y:
                y=z
                flag=0
                break
            flag=1
        if flag==1:
            count+=1
            y=ind[x][0]
    #         print(count,z,y)
    ans=count*l+z+1
    print(ans)
else:
    pritn(-1)

### FIXED CODE ###

s = input()
t = input()
r = 0
p = 0
x = 0
for i in t:
    if s.find(i) == -1:
        print(-1)
        exit()
    if p > s.find(i):
        if s[p:].find(i) == -1:
            x += 1
            p = s.find(i) + 1
        else:
            p = p + s[p:].find(i) + 1
    else:
        p = s.find(i) + 1
print(x * len(s) + p)
def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%5==0: return "Buzz"
	if n%3==0: return "Fizz"
	return str(n)

while 1:
	m,n=map(int,raw_input().split())
	if m==0:break
	player=range(1,m+1)
	p=0
	for i in range(n):
		if len(player)==1:
			break
		if fizzbuzz(i+1)!=raw_input():
			del player[p]
			p%=len(player)
		else:
			p=(p+1)%len(player)
	print " ".join(map(str,player))

### FIXED CODE ###

def fizzbuzz(n):
	if n%15==0: return "FizzBuzz"
	if n%3==0: return "Fizz"
	if n%5==0: return "Buzz"
	return str(n)
while 1:
	try:
		m,n=map(int,raw_input().split())
		if m==0:break
		player=range(1,m+1)
		p=0
		for i in range(n):
			if fizzbuzz(i+1)!=raw_input():
				del player[p]
				m=len(player)
				if m==1:
					break
				p%=m
			else:
				p=(p+1)%m
		print " ".join(map(str,player))
	except:
		pass
s = input()
gx, gy = map(int, input().split())


def dfs(x, y, si, f):
    if len(s) == si:
        if (x, y) == (gx, gy):
            return True
        return False
    ans = False
    if s[si] == 'T':
        return dfs(x, y, si + 1, not f)
    if f:
        for xx, yy in [(x + 1, y), (x - 1, y)]:
            ans = ans or dfs(xx, yy, si + 1, f)
    else:
        for xx, yy in [(x, y + 1), (x, y - 1)]:
            ans = ans or dfs(xx, yy, si + 1, f)
    return ans


def main():
    if dfs(0, 0, 0, True):
        print('Yes')
    else:
        print('No')


main()


### FIXED CODE ###

def main():
    s = input()
    x, y = map(int, input().split())
    sl = s.split('T')
    dx = list(map(len, sl[::2]))
    dy = list(map(len, sl[1::2]))
    nx = dx.pop(0)
    ny = 0
    dx.sort(reverse=True)
    dy.sort(reverse=True)
    for xx in dx:
        if x >= nx:
            nx += xx
        else:
            nx -= xx
    for yy in dy:
        if y >= ny:
            ny += yy
        else:
            ny -= yy
    print('YNeos'[nx != x or ny != y::2])


main()
import itertools
import numpy as np

n, m, x= map(int, input().split())
a = [input().split() for l in range(n)]
npa=np.array(a, dtype=int)

hon=-1
for i in range(1,n+1):
  base = list(itertools.combinations(range(0,n),i))
#  print (base)
  
  for j in base:
    totalv=np.sum(npa[j,], axis=0)
#    print (totalv, min(totalv[1:-1]))
    
    if (min(totalv[1:-1]) >= x):
      if (hon == -1): hon=totalv[0]
      if (hon >= totalv[0]): hon=totalv[0]
#      print (hon)
      
print (hon)

### FIXED CODE ###

import itertools
import numpy as np

n, m, x= map(int, input().split())
a = [input().split() for l in range(n)]
npa=np.array(a, dtype=int)

hon=-1
for i in range(1,n+1):
  base = list(itertools.combinations(range(0,n),i))
#  print (base)
  
  for j in base:
    totalv=np.sum(npa[j,], axis=0)
#    print (totalv, min(totalv[1:-1]))
    
    if (min(totalv[1:m+1]) >= x):
      if (hon == -1): hon=totalv[0]
      if (hon >= totalv[0]): hon=totalv[0]
#      print (hon)
      
print (hon)
n = int(input())
inf = float("inf")
road = [dict() for _ in range(n+1)]
for _ in range(n-1):
  a,b,c = map(int, input().split())
  road[a][b] = c
  road[b][a] = c
q,k = map(int, input().split())
dfs = [inf]*(n+1)
dfs[k] = 0
def dodfs(x):
  for i in road[x]:
    if dfs[i] == inf:
      dfs[i] = dfs[x] + road[x][i]
      dodfs(i)
  return   
dodfs(k)
for _ in range(q):
  x,y = map(int, input().split())
  print(dfs[x] + dfs[y])

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**6)
n = int(input())
inf = float("inf")
road = [dict() for _ in range(n+1)]
for _ in range(n-1):
  a,b,c = map(int, input().split())
  road[a][b] = c
  road[b][a] = c
q,k = map(int, input().split())
dfs = [inf]*(n+1)
dfs[k] = 0
def dodfs(x):
  for i in road[x]:
    if dfs[i] == inf:
      dfs[i] = dfs[x] + road[x][i]
      dodfs(i)
  return   
dodfs(k)
for _ in range(q):
  x,y = map(int, input().split())
  print(dfs[x] + dfs[y])
import sys
def solve():
    n = int(input())
    A = list(map(int,sys.stdin))
    cnt = 0
    G = [int((2.25**i-1)/1.25)for i in range(17,0,-1)]
    G = [v for v in G if v <= n]
    def insertionSort(A, n, g):
        global cnt
        for i in range(g, n):
            v = A[i]
            j = i - g
            while j >= 0 and A[j] > v:
                A[j+g] = A[j]
                j = j - g
                cnt += 1
            A[j+g] = v
    for g in G:
        insertionSort(A, n, g)
    print(len(G))
    print(*G)
    print(cnt)
    print('\n'.join(map(str,A)))
if __name__ == '__main__':
    solve()


### FIXED CODE ###

import sys
def insertionSort(A, n, g):
    global cnt
    for i in range(g, n):
        v = A[i]
        j = i - g
        while j >= 0 and A[j] > v:
            A[j + g] = A[j]
            j = j - g
            cnt += 1
        A[j + g] = v
def solve():
    n = int(input())
    A = list(map(int, sys.stdin))
    G = [int((2.25**i - 1) / 1.25)for i in range(17, 0, -1)]
    G = [v for v in G if v <= n]
    for g in G:
        insertionSort(A, n, g)
    print(len(G))
    print(*G)
    print(cnt)
    print('\n'.join(map(str, A)))
if __name__ == '__main__':
    cnt = 0
    solve()
A,B = map(int,input().split())
print("100 100")
ans = [["#"]*100 for _ in range(50)] + [["."]*100 for _ in range(50)]
A -=1
B -=1

wR = 0 
while A>=50:
    A -= 50
    [ans[wR][i]="." for i in range(0,100,2)]
    wR += 2
     
wC = 0
while A>0:
    A -= 1
    ans[wR][wC]="."
    wC += 2
    
bR=99
while B>=50:
    B -= 50
    [ans[bR][i]="#" for i in range(0,100,2)]
    bR -= 2
    
bC = 0
while B>0:
    B -= 1
    ans[bR][bC]="#"
    bC += 2

[print("".join(i)) for i in ans]


### FIXED CODE ###

A,B = map(int,input().split())
print("100 100")
ans = [["#"]*100 for _ in range(50)] + [["."]*100 for _ in range(50)]
A -=1
B -=1

wR = 0 
while A>=50:
    A -= 50
    for i in range(0,100,2):
        ans[wR][i]="."
    wR += 2
     
wC = 0
while A>0:
    A -= 1
    ans[wR][wC]="."
    wC += 2
    
bR=99
while B>=50:
    B -= 50
    for i in range(0,100,2):
        ans[bR][i]="#"
    bR -= 2
    
bC = 0
while B>0:
    B -= 1
    ans[bR][bC]="#"
    bC += 2

[print("".join(i)) for i in ans]
ab=raw_input().split()
a=int(ab[0])
b=int(ab[1])
num=1
for val in range(a,b+1,1):
    num*=val

if num > 0:
    print 'Positive'
elif num==0:
    print 'Zero'
else :
    print'Negative'

### FIXED CODE ###

ab=raw_input().split()
a=int(ab[0])
b=int(ab[1])
num=1
if a <=0 and b>=0:
    print 'Zero'
elif a>0:
    print 'Positive'
elif (b-a)%2==0:
    print 'Negative'
else:
    print'Positive'
from collections import deque
S = deque(input())
Q = int(input())
rev = 0
for i in range(Q):
  query = input()
  if query == "1": rev = 1 - rev 
  elif int(query[2]) + rev == 2: S.append(query[4])
  else:S.insert(0,query[4])
if rev == 1: S.reverse()  
print("".join(S))    

### FIXED CODE ###

from collections import deque
S = deque(input())
Q = int(input())
rev = 0
for i in range(Q):
  query = input()
  if query == "1": rev = 1 - rev 
  elif int(query[2]) + rev == 2: S.append(query[4])
  else:S.appendleft(query[4])
if rev == 1: S.reverse()  
print("".join(S))
import math
R = input()
print(math.pi*R**2)

### FIXED CODE ###

R = float(input())
print(2*3.141592653589793*R)
S = input()
K = int(input())

count = 0
while True:
    if S[count] == "1":
        count += 1
    else:
        break

if K > count:
    print(S[count])
else:
    print(1)


### FIXED CODE ###

S = input()
K = int(input())

count = 0
while count < len(S):
    if S[count] == "1":
        count += 1
    else:
        break
if K > count:
    print(S[count])
else:
    print(1)