Harryxun/stf_run huggingface dataset:
n,m = map(int, input().split())
a = set([int(input()) for i in range(m)])

mod = 10**9 + 7
dp = [0] * (n+1)
dp[0] = 1
if 1 not in a:
    dp[1] = 1
if 2 not in a:
    dp[2] = dp[0] + dp[1]
for i in range(3, n+1):
    if i not in a:
        dp[i] = (dp[i-1] + dp[i-2]) % mod
print(dp[n] % mod)
        

### FIXED CODE ###

n, m = map(int, input().split())
a = set([int(input()) for i in range(m)])

mod = 10**9 + 7
dp = [0] * (n + 3)
dp[0] = 1
if 1 not in a:
    dp[1] = 1
if 2 not in a:
    dp[2] = dp[0] + dp[1]
for i in range(3, n + 1):
    if i not in a:
        dp[i] = (dp[i - 1] + dp[i - 2]) % mod
print(dp[n] % mod)
n, k = map(int, input().split())
p = list(map(int, input().split())
p.sort()
ans = sum(p[:k])
print(ans)

### FIXED CODE ###

n, k = map(int, input().split())
p = list(map(int, input().split()))
         
p.sort()
ans = sum(p[:k])
print(ans)
l = input().split()
print(l[0] + l[3]/2)

### FIXED CODE ###

x, y = map(int, input().split())
print(x + y//2)
s=list(input())
a=[0]*(len(s)+1)
if s[0]=='<':
    a[0]=0
    l=0
    while s[l]=='<':
        a[l+1]=a[l]+1
        l+=1
        if l>len(s)-1:
          break
if s[len(s)-1]=='>':
    a[len(s)]=0
    m=len(s)-1
    while s[m]=='>':
        a[m]=a[m+1]+1
        m-=1
for i in range(len(s)-1):
    if s[i]=='>' and s[i+1]=='<':
        a[i+1]=0
        k=i
        t=i+1
        while s[k]=='>':
            a[k]=a[k+1]+1
            k-=1
            if k<0 or k>len(s)-1:
                break
        while s[t]=='<':
            a[t+1]=a[t]+1
            t+=1
            if t<0 or t>len(s)-1:
                break
for i in range(len(s)-1):
    if s[i]=='<' and s[i+1]=='>':
        a[i+1]=max(a[i],a[i+2])+1
print(sum(a))

### FIXED CODE ###

s=list(input())
a=[0]*(len(s)+1)
if s[0]=='<':
    a[0]=0
    l=0
    while s[l]=='<':
        a[l+1]=a[l]+1
        l+=1
        if l>len(s)-1:
          break
if s[len(s)-1]=='>':
    a[len(s)]=0
    m=len(s)-1
    while s[m]=='>':
        a[m]=a[m+1]+1
        m-=1
        if m<0:
          break
for i in range(len(s)-1):
    if s[i]=='>' and s[i+1]=='<':
        a[i+1]=0
        k=i
        t=i+1
        while s[k]=='>':
            a[k]=a[k+1]+1
            k-=1
            if k<0 or k>len(s)-1:
                break
        while s[t]=='<':
            a[t+1]=a[t]+1
            t+=1
            if t<0 or t>len(s)-1:
                break
for i in range(len(s)-1):
    if s[i]=='<' and s[i+1]=='>':
        a[i+1]=max(a[i],a[i+2])+1
print(sum(a))
pair = [[1,2],[2,5],[3,5],[4,4],[5,5],[6,6],[7,3],[8,7],[9,6]]
n,m =[int(x) for x in input().split()]
given = sorted([int(i) for i in input().split()])
given_pair = sorted([pair[x-1] for x in given],key = lambda x :x[1])
def rec(n,t_list,pair_list):
  if n==0:
    return t_list
  elif n< pair_list[0][1]:
    return t_list[:-1]
  else:
    a = rec(n-pair_list[0][1],t_list+[pair_list[0][0]],pair_list)
    if pair_list[1:]!=[]:
        b = rec(n,t_list,pair_list[1:])
        if len(a)>len(b):
                return a
        elif len(a)==len(b):
                if(a[-1]>b[-1]):
                        return a
                else:
                        return b
        else:
                return b
    else:
        return a

kotae = map(str,sorted(rec(n,[],given_pair),reverse=True))
print("".join(kotae))

### FIXED CODE ###

n, m = [int(i) for i in input().split()]
am = sorted([int(i) for i in input().split()],reverse=True)
c = [2, 5, 5, 4, 5, 6, 3, 7, 6]

dp = [-1 for i in range(n+1)]
dp[0]=0
for i in range(n+1):
    #max_tmp = -float("inf")
    for j in am:
        if i+c[j-1]<=n:
            dp[i+c[j-1]] = max(dp[i+c[j-1]], dp[i]+1)
#print(dp)
tmp_n = n
ans =""
for i in range(dp[n]):
    for j in range(m):
        if i==dp[n]-1 and tmp_n- c[am[j]-1] != 0:
            continue
        if tmp_n - c[am[j]-1] >= 0 and dp[tmp_n - c[am[j]-1]] == dp[tmp_n] -1:
            ans+=(str(am[j]))
            tmp_n -= c[am[j]-1]
            break


print(ans)
n = input()
l = input()
s = input() for i in range(n)
print(*stored(s),sep="")


### FIXED CODE ###

n,l = map(int,input().split())
s = [input() for i in range(n)]
print(*sorted(s),sep="")
n=int(input())
l=list(map(int,input()split()))
ans=0
for i in range(n):
  if i%2==0 and l[i]%2==1:
    ans+=1
print(ans)

### FIXED CODE ###

n=int(input())
l=list(map(int,input().split()))
print(sum(1 for i in range(n) if i%2==0 and l[i]%2==1))
d = input().rstrip()
d_list = d.split(" ")
t_list = []
for i in range(int(d_list[1])):
    t_list.append(input().rstrip())


def solution(t_list):
    t_list.sort()
    ans_str = ""
    for i in t_list:
        ans_str += i
    return ans_str
    
def main():
    print(solution(t_list))
    
if __name__ == '__main__':
    main()

### FIXED CODE ###

import sys
t_list = []
for i in sys.stdin.readlines():
    t_list.append(i.rstrip())
t_list.pop(0)

def solution(t_list):
    t_list.sort()
    ans_str = ""
    for i in t_list:
        ans_str += i
    return ans_str
    
def main():
    print(solution(t_list))
    
if __name__ == '__main__':
    main()
import sys
readline = sys.stdin.buffer.readline
sys.setrecursionlimit(10 ** 8)
INF = float('inf')
MOD = 10 ** 9 + 7
 
def main():
    N, L, T = map(int, readline().split())
    position = []
    cnt = 0
    for i in range(N):
        x,w = map(int, readline().split())
        if w==1:
        	cnt += (x+T)//L
            position.append((x+T)%L)
        else:
            if x-T<0:
                cnt += (x-T)//L
            position.append((x-T)%L)
    position.sort()
    cnt %= N
    ans = position[cnt:] + position[:cnt]
    for i in range(N):
        print(ans[i])


### FIXED CODE ###

def main():
    N, L, T = map(int, input().split())
    collision = 0
    ants = []
    for i in range(N):
        x, w = map(int, input().split())
        if w == 1:
            collision += (x + T) // L
            a = (x + T) % L
        else:
            collision += (x - T) // L
            a = (x - T) % L
        ants.append(a)
 
    collision %= N
    ants.sort()
    ants = ants[collision:] + ants[:collision]
    for ant in ants:
        print(ant)
 
 
if __name__ == '__main__':
    main()
A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())

dic = {"A":A,"B":B,"C":C,"D":D,"E":E}

arr1 = []
arr2 = []
res = 0

for k,v in dic.items():
    if v % 10 != 0:
        arr1.append((int(v / 10) + 1 ) * 10 - v)
    res += v

fraction = sum(arr1)     
for i in arr1:
    arr2.append(fraction - i)

print(res + min(arr2))

### FIXED CODE ###

A = int(input())
B = int(input())
C = int(input())
D = int(input())
E = int(input())
 
dic = {"A":A,"B":B,"C":C,"D":D,"E":E}
 
arr1 = []
arr2 = []
res = 0
 
for k,v in dic.items():
    if v % 10 != 0:
        arr1.append((int(v / 10) + 1 ) * 10 - v)
    res += v
    
if len(arr1) > 0:
    fraction = sum(arr1)     
    for i in arr1:
        arr2.append(fraction - i)

    print(res + min(arr2))
else:
    print(res)
Q = int(input())

mod = 10 ** 6 + 3
table = [1]
for i in range(1, mod):
    table.append(table[-1]*i % mod)

for i in range(Q):
    x, d, n = map(int, input().split())
    if d == 0:
        print(pow(x, n, mod))
    else:
        y = x * pow(d, mod - 2, mod)% mod
        print(pow(d, n, mod) * table[y + n - 1] * pow(table[y - 1], mod - 2, mod) % mod)

### FIXED CODE ###

Q = int(input())

mod = 10 ** 6 + 3
table = [1]
for i in range(1, mod):
    table.append(table[-1]*i % mod)

for i in range(Q):
    x, d, n = map(int, input().split())
    if d == 0:
        print(pow(x, n, mod))
    else:
        y = x * pow(d, mod - 2, mod) % mod
        if y + n - 1 >= mod:
            print(0)
        else:
            print(pow(d, n, mod) * table[y + n - 1] * pow(table[y - 1], mod - 2, mod) % mod)
N = input()

a = int(N[len(N)-1])

if a == 3:
  print(bon)
else if a==0 or a==1 or a==6 or a==8:
  print(pon)
else:
  print(hon)

### FIXED CODE ###

N = input()
 
a = int(N[len(N)-1])
 
if a == 3:
  print('bon')
elif a==0 or a==1 or a==6 or a==8:
  print('pon')
else:
  print('hon')
import sys
input = sys.stdin.readline

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()))

ab = sorted(x+y for x in a for y in b)[:-k-1:-1]
abc = sorted(ab+c for ab in ab[:k] for c in c)[:-k-1:-1]

print(*abc, sep="\n")




### FIXED CODE ###

import sys
input = sys.stdin.readline

x,y,z,k = map(int,input().split())
lisa = sorted(map(int,input().split()))
lisb = sorted(map(int,input().split()))
lisc = sorted(map(int,input().split()))

ab = sorted(a+b for a in lisa for b in lisb)[:-k-1:-1]
abc = sorted(ab+c for ab in ab[:k] for c in lisc)[:-k-1:-1]

print(*abc, sep="\n")
a = input()
b = inout()
 
if (a==b[:len(a)-1]):
  print("Yes")
else:
  print("No")

### FIXED CODE ###

a = input()
b = input()
 
if (a==b[:len(a)]):
  print("Yes")
else:
  print("No")

#print(b[:len(a)-1])
a = input()
n = int(len(a))
amari = int(n) % 2
flag = str()
if n == 1:
    if a = "S":
        print("No")
        flag = "unko"
    else:
        pass

elif amari == 0:
    for i in range (1, (int(n) // 2)):
        if a[int(i) * 2 - 2] == "S":
            print("No")
            flag = "unko"
            break
        elif a[int(i) * 2 - 1] == "R":
            print("No")
            flag = "unko"
            break
        else:
            pass

elif amari == 1:
    for i in range (1, (int(n) // 2)):
        if a[int(i) * 2 - 2] == "S":
            print("No")
            flag = "unko"
            break
        elif a[int(i) * 2 - 1] == "R":
            print("No")
            flag = "unko"
            break
        else:
            pass       
    if a[int(n) - 1] == "S" and flag == "":
        print("No")
        flag = "unko"
else:
    pass

if flag == "":
    print("Yes")

### FIXED CODE ###

# coding: utf-8
# Your code here!
a = input()
n = int(len(a))
amari = int(n) % 2
flag = str()
if n == 1:
    if a == "L":
        print("No")
        flag = "unko"
    else:
        pass
elif amari == 0:
    for i in range (1, (int(n) // 2)+1):
        if a[int(i) * 2 - 2] == "L":
            print("No")
            flag = "unko"
            break
        elif a[int(i) * 2 - 1] == "R":
            print("No")
            flag = "unko"
            break
        else:
            pass

elif amari == 1:
    for i in range (1, (int(n) // 2)+1):
        if a[int(i) * 2 - 2] == "L":
            print("No")
            flag = "unko"
            break
        elif a[int(i) * 2 - 1] == "R":
            print("No")
            flag = "unko"
            break
        else:
            pass
    if a[int(n) - 1] == "L" and flag == "":
        print("No")
        flag = "unko"
else:
    pass

if flag == "":
    print("Yes")
import sys
def input():
	return sys.stdin.readline().strip()

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

sum_list = [0]
even_odd_sum = [0, 0]
for i in range(N):
	sum_list.append(sum_list[-1] + A[i])
	even_odd_sum.append(even_odd_sum[-2] + A[i])

for q in range(Q):
	x = int(input())
	if x >= A[-1]:
		print(even_odd_sum[-1])
	else:
		loc_min = bisect.bisect_right(A, x)
		loc_min = max(loc_min, N // 2)
		loc_max = (loc_min + N) // 2

		t = (loc_min + loc_max) // 2

		while (loc_min <= loc_max):

			if 2*t - N - 1 >= 0 and A[t - 1] - x >= x - A[2*t - N - 1]:
				loc_max = t - 1

			elif A[t] - x < x - A[2*t - N]:
				loc_min = t + 1
			else:
				break
			#print(loc_min, loc_max, t)
			t = (loc_min + loc_max) // 2
		ans = sum_list[-1] - sum_list[t] + even_odd_sum[2*t - N - 1 + 2]
		print(ans)

### FIXED CODE ###


import sys
from collections import deque, defaultdict
import copy
import bisect
sys.setrecursionlimit(10 ** 9)
import math
import heapq
from itertools import product, permutations,combinations
import fractions

import sys
def input():
	return sys.stdin.readline().strip()

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

sum_list = [0]
even_odd_sum = [0, 0]
for i in range(N):
	sum_list.append(sum_list[-1] + A[i])
	even_odd_sum.append(even_odd_sum[-2] + A[i])

for q in range(Q):
	x = int(input())
	if x >= A[-1]:
		print(even_odd_sum[-1])
	else:
		loc_min = bisect.bisect_left(A, x)
		loc_min = max(loc_min, N // 2)
		loc_max = (loc_min + N) // 2

		t = (loc_min + loc_max) // 2


		#print(x, loc_min, loc_max, t, 2*t - N - 1)
		while (loc_min <= loc_max):

			if 2*t - N - 1 >= 0 and A[t - 1] - x >= x - A[2*t - N - 1]:
				loc_max = t - 1
			elif 2*t - N >= 0 and A[t] - x < x - A[2*t - N]:
				loc_min = t + 1
			elif 2*t - N < 0 and A[t] - x < x - A[0]:
				loc_min = t + 1
			else:
				break

			t = (loc_min + loc_max) // 2
		ans = sum_list[-1] - sum_list[t] + even_odd_sum[2*t - N - 1 + 2]
		print(ans)
import math
A = int(input())
B = int(input())
H = int(input())
M = int(input())

h = H * 30 + 0.5 * M
m = 6 * M
hh = abs(h - m)
mm = 360 - hh

if hh <= mm:
    c = hh
else:
    c = mm

c = math.radians(c)

C = (A * A) + (B * B) - (2 * A * B * math.cos(c))
print(math.sqrt(C))


### FIXED CODE ###

import math
A,B,H,M = map(int,input().split())


h = H * 30 + 0.5 * M
m = 6 * M
hh = abs(h - m)
mm = 360 - hh

if hh <= mm:
    c = hh
else:
    c = mm

c = math.radians(c)

C = (A * A) + (B * B) - (2 * A * B * math.cos(c))
print(math.sqrt(C))

"""
A = int(input())
B = int(input())
H = int(input())
M = int(input())
"""
a,b = int(input.split())

x=a+b
y=a-b
z=a*b
print(max(x,y,z))

### FIXED CODE ###

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

c=a+b
d=a-b
e=a*b
print(max(c,d,e))
N=int(input())
S=input()
L=[]
len_s=len(S)
for i in range(2,len_s-1):
  L1=list(S[1:i]);L2=list(S[i:len_s])
  L.append(len(list(set(L1)&set(L2))))
print(max(L))

### FIXED CODE ###

N=int(input())
S=input()
L=[]
for i in range(0,N):
  L1=list(S[0:i]);L2=list(S[i:N])
  L.append(len(list(set(L1)&set(L2))))
print(max(L))
N,M=map(int,input().split())
A=[list(map(int,input().split())) for i in range(N)]
A=sorted(A,key=lambda x:x[0])
cnt=0 #本数
ans=0 #値段
for i in range(N):
  cnt+=A[i][1]
  if cnt>=m:
    over=cnt-m
    ans+=over*A[i][0]
    cnt+=over
  else:
    ans+=A[i][0]*A[i][1]
print(ans)

### FIXED CODE ###

N,M=map(int,input().split())
k=M
s=0
A=[list(map(int,input().split())) for i in range(N)]
A=sorted(A,key=lambda x:x[0])
while k>0:
  for i in range(N):
    if k>A[i][1]:
      s+=A[i][0]*A[i][1]
      k=k-A[i][1]
    else:
      s+=A[i][0]*k
      k=0
print(s)
#! /Library/Frameworks/Python.framework/Versions/3.7/bin/python3
N = int(input())
n = N
divs = []
a = 1
b = N


def primes(n):
    is_prime = [True] * (n + 1)
    is_prime[0] = False
    is_prime[1] = False
    for i in range(2, int(n**0.5) + 1):
        if not is_prime[i]:
            continue
        for j in range(i * 2, n + 1, i):
            is_prime[j] = False
    return [i for i in range(n + 1) if is_prime[i]]


Ps = primes(10 ** 6)
Ps.reverse()

for P in Ps:
    x, y = divmod(n, P)
    while y == 0:
        n = x
        divs.append(P)
        x, y = divmod(n, P)
if divs == [] or len(divs) == 1:
    print(N - 1)
    exit()
else:
    length = len(divs)
    for i in range(2 ** length):
        a1 = 1
        s = format(i, '025b')
        for j in range(length):
            #print("s[-j-1]:" + s[-j - 1])
            #print("divs[j]:" + str(divs[j]))
            if s[-j - 1] == '1':
                a1 = a1 * divs[j]
                #print("divs[j]" + str(divs[j]))
                #print("a1:" + str(a1))
        b1 = N // a1
        #print("a1:" + str(a1))
        if a1 + b1 < a + b:
            a = a1
            b = b1
# print(divs)
#print("str:" + s)
print(a+b-2)

### FIXED CODE ###

N = int(input())
ans = N-1
for i in range(int(N ** 0.5), 1, -1):
    x, y = divmod(N, i)
    if y == 0:
        print(i+x-2)
        exit()
print(ans)
n, m = map(int, input().split())

adj = [[] for i in range(n)]

for i in range(m):
    s, t = map(int, input().split())
    adj[s].append(t)
    adj[t].append(s)

isVisited = [False] * n

CC = [None] * n

import sys
sys.setrecursionlimit(20000)

def dfs(u, group):
    isVisited[u] = True
    CC[u] = group
    for v in adj[u]:
        if not isVisited[v]:
            dfs(v, group)

def makeCC(group):
    for i in range(n):
        if not isVisited[i]:
            dfs(i, group)
            group += 1

def isConnected(v1, v2):
    if CC[v1] == CC[v2]:
        print('yes')
    else:
        print('no')


makeCC(0)


q = int(input())

for i in range(q):
    s, t = map(int, input().split())
    isConnected(s, t)

### FIXED CODE ###

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

adj = [[] for i in range(n)]

for i in range(m):
    s, t = map(int, input().split())
    adj[s].append(t)
    adj[t].append(s)

groups = [None] * n


def dfs(u, group_num):
    path = []
    path.append(u)
    groups[u] = group_num
    while path:
        u = path[-1]
        if adj[u]:
            v = adj[u].pop(0)
            if not groups[v]:
                groups[v] = group_num
                path.append(v)
        else:
            path.pop()


g_n = 1
for i in range(n):
    if not groups[i]:
        dfs(i, g_n)
        g_n += 1

def isConnected(v1, v2):
    if groups[v1] == groups[v2]:
        print('yes')
    else:
        print('no')


q = int(input())

for i in range(q):
    s, t = map(int, input().split())
    isConnected(s, t)
'''
                                    *             * * * * * * * *
                                    *             *
                                    *             *
                                    *             *
                                    *             *
                                    *             *
                                    *             *
                                    * * * * * * * * * * * * * * *
                                                  *             *
                                                  *             *
                                                  *             *
                                                  *             *
                                                  *             *
                                                  *             *
                                    * * * * * * * *             *

'''
import sys
sys.setrecursionlimit(10**9)
dp=[-1]*(10**5+2)
dp[0]=0
def frog2(arr,N,K):
    if N==0:
        return dp[0]
    if dp[N]!=-1:
        return dp[N]
    cnt=10**8
    for i in range(N-1,max(N-K-1,-1),-1):
        cnt=min(cnt,frog2(arr,i,K)+abs(arr[N]-arr[i]))
    dp[N]=cnt
    return cnt
if __name__ == "__main__":
    N,K=map(int,input().split())
    h=[int(i) for i in input().split()][:N]
    frog2(h,N-1,K)
    #print(dp)
    print(dp[N-1])

### FIXED CODE ###

from sys import stdin
N,K=map(int,stdin.readline().split())
h=[int(i) for i in stdin.readline().split()][:N]
dp=[float('inf') for i in range(N)]
dp[0]=0
for i in range(N):
    for j in range(i+1,i+K+1):
        if j<N:
            dp[j]=min(dp[j],dp[i]+abs(h[j]-h[i]))
    #print(dp)
print(dp[-1])
n = int(input())

L = [int(i) for i in input().split()]

for i in range(n-2):
     if L[i]<L[i+1] and L[i+1]<L[i+2]:
             Answer = Answer + 1
             continue
     if L[i+2]<L[i+1] and L[i+1]<L[i]:
             Answer = Answer + 1
             continue
print(Answer)

### FIXED CODE ###

n = int(input())

L = [int(i) for i in input().split()]

Answer = int(0)
for i in range(n-2):
     if L[i]<L[i+1] and L[i+1]<L[i+2]:
             Answer = Answer + 1
             continue
     if L[i+2]<L[i+1] and L[i+1]<L[i]:
             Answer = Answer + 1
             continue
print(Answer)
N, K = map(int, input().split())
S = input()

arr = []
cnt = 0
comp = S[0]
for s in S:
    if s==comp:
        cnt += 1
    else:
        if comp=='0':
            arr.append(-cnt)
        else:
            arr.append(cnt)
        cnt = 1
        comp = s
if comp=='0':
    arr.append(-cnt)
else:
    arr.append(cnt)

def iter(A, cnt):
    if cnt>=K or len(A)<2:
        return max(A)
    elif len(A)==2:
        return abs(A[0]) + abs(A[1])
    m = -A[0]+A[1]
    arg = -1
    for i in range(len(A)-2):
        s3 = A[i] - A[i+1] + A[i+2]
        if m<s3:
            m = s3
            arg = i
    s3 = A[-2]-A[-1]
    if m<s3:
        m = s3
        arg = len(A)-1
    if arg==-1:
        B = [-A[0]+A[1]] + A[2:]
    elif arg==len(A)-1:
        B = A[:-2] + [A[-2]-A[-1]]
    else:
        B = A[:arg] + [A[arg] - A[arg+1] + A[arg+2]] + A[arg+3:]
    return iter(B, cnt+1)


print(iter(arr, 0))

### FIXED CODE ###

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

arr = []
cnt = 0
comp = S[0]
for s in S:
    if s==comp:
        cnt += 1
    else:
        arr.append(cnt)
        cnt = 1
        comp = s
arr.append(cnt)

if len(arr)<3:
    print(sum(arr))
else:
    if S[0]=='1':
        L = (len(arr)+1)//2 - K +1
        l = 0
        tmp = sum(arr[2*l:2*(l+K)+1])
        ans = tmp
        for l in range(1, L):
            tmp = tmp - (arr[2*(l-1)]+arr[2*l-1]) + sum(arr[2*(l-1+K)+1 : min(2*(l+K)+1, len(arr))])
            ans = max(tmp, ans)
    else:
        L = (len(arr)+1)//2 - K + 1
        l = 0
        tmp = sum(arr[2*l:2*(l+K)])
        ans = tmp
        for l in range(1, L):
            tmp = tmp - sum(arr[max(0,2*l-3) : 2*l-1]) + sum(arr[2*(l+K-1): min(2*(l+K), len(arr))])
            ans = max(tmp, ans)
            
    print(ans)
while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  for i in range(H):
    width = "#"
    if i == 0 or i == H - 1:
      for j in range(W-1):
        width += "#"
      print width
    else:
       for j in range(W-2):
        width += "."
      width += "#"
      print width
  print ""

### FIXED CODE ###

while True:
  H, W = map(int, raw_input().split())
  if H == 0 and W == 0:
    break
  print "#"*W
  for i in range(H-2):
    if W > 2:
      print "#" + "."*(W-2) + "#"
    else:
      print "#"*W 
  print "#"*W
  print ""
if N%2==0:
    print(2)
else:
    print(2*N)

### FIXED CODE ###

n = int(input())

if (n%2 == 0):
    print(n)
else:
    print(2*n)
s=input()
l=['A','C','G','T']
index_s=[]
for i in range(len(s)):
    if s[i] not in l:
        index_s+=[i]
        
ans=[index_s[0]]
for i in range(len(index_s)-1):
    ans+=[index_s[i+1]-index_s[i]-1]

ans.sort()    
print(ans[-1])

### FIXED CODE ###

s=input()
l=['A','C','G','T']
len_s=[]
count=0
for i in range(len(s)):
    if s[i] in l and i!=len(s)-1:
        count+=1
    elif s[i] not in l:
        len_s+=[count]
        count=0
    else:
        count+=1
        len_s+=[count]
print(max(len_s))