Harryxun/stf_run huggingface dataset:
A = input()
A = A[::-1]
divide = [i[::-1] for i  in ["dream", "dreamer", "erase", "eraser"]]

flag = 1
while flag and A:
  flag = 0
  for word in divide:
    if A.startswith(word):
      A = A[len(word):]
      print(A)
      flag = 1

if len(A) == 0:
  print('YES')
else:
  print('NO')

### FIXED CODE ###

A = input()
A = A[::-1]
divide = [i[::-1] for i  in ["dream", "dreamer", "erase", "eraser"]]

flag = 1
while flag and A:
  flag = 0
  for word in divide:
    if A.startswith(word):
      A = A[len(word):]
      flag = 1

if len(A) == 0:
  print('YES')
else:
  print('NO')
S = input()
print(x * len(S))


### FIXED CODE ###

S = input()
print('x' * len(S))
a = input()
b = input()
print max(0,a-2*b)

### FIXED CODE ###

a,b = map(int ,raw_input().split())
print max(0,a-2*b)
a,b,c=[int(i)for i in input().split()]
if c+b-a>0:
  print(c+b-a)
else:
  prnit("0")

### FIXED CODE ###

a,b,c=[int(i)for i in input().split()]
if c+b-a>0:
  print(c+b-a)
else:
  print("0")
n, m = map(int, input())

if n <= 9 and m <- 9:
  print(n * m)


### FIXED CODE ###

n, m = map(int, input().split())
 
if n <= 9 and m <= 9:
  print(n * m)
else:
  print(-1)
t=list(map(int,input().split()))
a=list(map(int,input().split()))
b=list(map(int,input().split()))
p,q=[0],[0]
w=[(a[0]-b[0])*t[0],(a[1]-b[1])*t[1]]
if sum(w)==0:
    print(w[9])
    #print("infinity")
else:
    print("infinity")
    #print(w[9])


### FIXED CODE ###

T1, T2 = map(int, input().split())
A1, A2 = map(int, input().split())
B1, B2 = map(int, input().split())
 
P = (A1 - B1) * T1
Q = (A2 - B2) * T2
if P > 0:
	P *= -1
	Q *= -1
 
if P + Q < 0:
	print(0)
elif P + Q == 0:
	print("infinity")
else:
	S = (-P) // (P + Q)
	T = (-P) % (P + Q)
	if T != 0:
		print(S * 2 + 1)
	else:
		print(S * 2)
N = int(input())
L = []
for _ in range(N):
    L.append(int(input()))
def lcm(x, y):
    if x > y:
        x,y = y,x
    if x == 0:
        return y
    r = y % x
    return lcm(r,x)
def gcd(x,y):   
    return   x*y // lcm(x,y)

ans = gcd(L[1],L[0])
for x in L:
    ans = gcd(ans,x)
print(ans)

### FIXED CODE ###

N = int(input())
L = []
for _ in range(N):
    L.append(int(input()))
def lcm(x, y):
    if x > y:
        x,y = y,x
    if x == 0:
        return y
    r = y % x
    return lcm(r,x)
def gcd(x,y):   
    return   x*y // lcm(x,y)

ans = L[0]
for x in L:
    ans = gcd(ans,x)
print(ans)
import math

r = int(input())
print(r * r * math.pi, 2 * r * math.pi)

### FIXED CODE ###

from math import pi

r = float(input())
print(r * r * pi, 2 * r * pi)
n = int(input())

maxm = 0
num = -1

for i in range():
    a, b = map(int, input().split())
    if a > maxm:
        maxm = a
        num = b

print(maxm + num)

### FIXED CODE ###

n = int(input())

maxm = 0
num = -1

for i in range(n):
    a, b = map(int, input().split())
    if a > maxm:
        maxm = a
        num = b

print(maxm + num)
def popcount(num):
    ans = 0
    while num:
        if num % 2 == 1:
            ans += 1
        num //= 2
    return ans


N = int(input())
X = input()

popcount_X = 0
for x in X:
    if x == "1":
        popcount_X += 1

tmp4p = int(X, 2) % (popcount_X+1)
tmp4m = int(X, 2) % (popcount_X-1)

for i in range(N):
    bit = X[i]

    f = 0
    if (popcount_X == 1 and bit == 1):
        print(f)
        continue
    
    if bit == "1":
        nxt = ( tmp4m - pow(2, N-i-1, (popcount_X-1))  + (popcount_X-1) ) % (popcount_X-1)
    else:
        nxt = ( tmp4p + pow(2, N-i-1, (popcount_X+1))  ) % (popcount_X+1)

    f += 1
    while nxt:
        pc = popcount(nxt)
        nxt = nxt % pc
        f += 1
    
    print(f)


### FIXED CODE ###

def popcount(num):
    ans = 0
    while num:
        if num % 2 == 1:
            ans += 1
        num //= 2
    return ans


N = int(input())
X = input()

popcount_X = 0
for x in X:
    if x == "1":
        popcount_X += 1

tmp4p = int(X, 2) % (popcount_X+1)
if popcount_X != 1:
    tmp4m = int(X, 2) % (popcount_X-1)

for i in range(N):
    bit = X[i]

    f = 0
    if (popcount_X == 1 and bit == "1"):
        print(f)
        continue
    
    if bit == "1":
        nxt = ( tmp4m - pow(2, N-i-1, (popcount_X-1))  + (popcount_X-1) ) % (popcount_X-1)
    else:
        nxt = ( tmp4p + pow(2, N-i-1, (popcount_X+1))  ) % (popcount_X+1)

    f += 1
    while nxt:
        pc = popcount(nxt)
        nxt = nxt % pc
        f += 1
    
    print(f)
from collections import*
from itertools import*
from copy import*
n,m=map(int,input().split())

grid=[tuple("#"*(m+2))]+[tuple("#"+input()+"#")for i in range(n)]+[tuple("#"*(m+2))]

#print(grid)

start=[]
for i in range(1,n+1):
    for j in range(1,m+1):
        start.append((i,j))

ans=0
for s,g in combinations(start,2):
    G=deepcopy(grid)
    if G[s[0]][s[1]]!="#":
        G[s[0]][s[1]]=0
    else:
        continue
    if G[g[0]][g[1]]=="#":
        continue
    Q=deque([s])
    while Q:
        y,x=Q.pop()
        for my,mx in (-1,0),(1,0),(0,-1),(0,1):
            if G[y+my][x+mx]==".":
                G[y+my][x+mx]=G[y][x]+1
                Q.appendleft((y+my,x+mx))
    
    if type(G[g[0]][g[1]])!=str:
        if ans<G[g[0]][g[1]]:
            ans=G[g[0]][g[1]]
print(ans)

### FIXED CODE ###

from collections import*
from copy import*
n,m=map(int,input().split())

grid=[list("#"*(m+2))]+[list("#"+input()+"#")for i in range(n)]+[list("#"*(m+2))]
#print(grid)

start=[]
for i in range(1,n+1):
    for j in range(1,m+1):
        start.append((i,j))

ans=0
for s in start:
    G=deepcopy(grid)
    if G[s[0]][s[1]]!="#":
        G[s[0]][s[1]]=0
    else:
        continue
    Q=deque([s])
    while Q:
        y,x=Q.pop()
        for my,mx in (-1,0),(1,0),(0,-1),(0,1):
            if G[y+my][x+mx]==".":
                G[y+my][x+mx]=G[y][x]+1
                Q.appendleft((y+my,x+mx))
    
    x=max( max([0]+[j for j in i  if type(j)==int]) for i in G)
    if x>ans:
        ans=x
print(ans)
n, m, k = map(int,input().split())
a = list(map(int,input().split()))
b = list(map(int,input().split()))

a_sum = 0
a_i = 0
flag = 0
for i in range(len(a)):
    if a_sum+a[i] <= k:
        a_sum += a[i]
    elif a_sum+a[i] > k:
        a_i = i-1
        break
if i == len(a)-1:
    a_i = len(a)-1

b_sum = 0
flag = 0
for i in range(len(b)):
    if b_sum+b[i] <= k:
        b_sum += b[i]
    elif b_sum+b[i] > k:
        b_i = i-1
        break
if i == len(b)-1:
    b_i = len(b)-1

ans = 0
temp = 0
a_temp = 0
b_temp = 0
if k < a[0] and k < b[0]:
    print(0)
else:
    while (k > a_sum or k > b_sum) and (a_sum > 0 or b_sum > 0):
        if (a_sum <= b_sum and a_sum > 0) or b_sum == 0:
            ans += 1
            k -= a[a_temp]
            a_sum -= a[a_temp]
            a_temp += 1
        elif b_sum > 0:
            ans += 1
            k -= b[b_temp]
            b_sum -= b[b_temp]
            b_temp += 1
        while a_sum > k and a_i != a_temp:
            a_sum -=a[a_i]
            if a_sum < 0:
                a_sum = 0
            a_i -= 1
        while b_sum > k and b_i != b_temp:
            b_sum -=b[b_i]
            if b_sum < 0:
                b_sum = 0
            b_i -= 1
    print(ans)


### FIXED CODE ###

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

a_sum = [0]
for i in range(len(a)):
    a_sum.append(a_sum[len(a_sum)-1]+a[i])

b_sum = [0]
for i in range(len(b)):
    b_sum.append(b_sum[len(b_sum)-1]+b[i])

ans = 0
b_i = len(b_sum)-1

for i in range(len(a_sum)):
    if a_sum[i] > k:
        break
    else:
        if b_i > -1:
            while b_sum[b_i] + a_sum[i] > k and b_i > -1:
                b_i -= 1
            if b_i > -1 and ans < i+b_i:
                ans = i+b_i
        else:
            if a_i > ans:
                ans = a_i

print(ans)
N = int(input())

def solve(a, i, prev):
  r = N - len(prev) - i + 1
  p = -i*a
  for j, s in enumerate(prev):
    yield max(p+abs(j-i)*a, s+abs(j+r)*a)
    p = s
  yield s+abs(len(prev)-i)*a

pd = [0]
A = map(int, input().split())
for a,i in sorted(((a, i) for i, a in enumerate(A, 1)), reverse=True):
  pd = [*solve(a,i, prev)]

print(max(prev))


### FIXED CODE ###

from collections import *
from itertools import *

N = int(input())

A = map(int, input().split())
SA = SB = 0
ABI = sorted(((b:=max(N-i, i-1)*a, SA:=SA+a, SB:=SB+b) and (a, b, i) for i, a in enumerate(A, 1)), reverse=True)

prev = {0:0}
prev_max = 0
for k, (a, b, i) in enumerate(ABI):
  curr = defaultdict(int)
  curr_max = 0
  for l, p in prev.items():
    r = k-l
    if p + SB - min(l,r)*SA < prev_max:
      continue
    curr[l] = max(curr[l], p+abs(N-i-r)*a)
    curr[l+1] = p+abs(i-l-1)*a
    curr_max = max(curr_max, curr[l], curr[l+1])
  SA -= a
  SB -= b
  prev = curr
  prev_max = curr_max

print(curr_max)
a,b = map(int,input.split())
c,d = map(int,input.split())
e = int(input())
print((c*60+d)-(a*60+b)-e)

### FIXED CODE ###

a,b,c,d,e = map(int,input().split())
print((c*60+d)-(a*60+b)-e)
n=int(input())
a=[[]for i in range(n)]
for i in range(n-1):
    c,d=map(int,input().split())
    a[c-1].append([d-1,i])
b=[0]*(n-1)
def f(x,y):
    r=1
    for (i,j) in a[x]:
        if r==y:
            r+=1
        b[j]=r
        f(i,r)
        r+=1
f(0,0)
print(max(b))
print(*b,sep="\n")

### FIXED CODE ###

import sys
sys.setrecursionlimit(10**7)
n=int(input())
s=[[]for i in range(n+1)]
t=[0]*(n-1)
for i in range(n-1):
    a,b=map(int,input().split())
    s[a-1].append([b-1,i])
def f(x,r):
    c=1
    for (i,j) in s[x]:
        if c==r:
            c+=1
        t[j]=c
        f(i,c)
        c+=1
f(0,0)
print(max(t))
for i in t:
    print(i)
import sys
import itertools

class RSQ:
    def __init__(self, n):
        self.sz = 1
        self.inf = (1 << 31) - 1
        while self.sz < n: self.sz = self.sz << 1
        self.dat = [0] * (2 * self.sz - 1)
    
    def update(self, idx, x):
        idx += self.sz - 1
        self.dat[idx] += x
        while idx > 0:
            idx = (idx - 1) >> 1
            self.dat[idx] += x
            
    def query(self, a, b):
        return self.query_help(a, b, 0, 0, self.sz)
            
    def query_help(self, a, b, k, l, r):
        if r <= a or b <= l:
            return 0
        elif a <= l and r <= b:
            return self.dat[k]
        else:
            return self.query_help(a, b, 2 * k + 1, l, (l + r)>>1) + \
                    self.query_help(a, b, 2 * k + 2, (l + r) >> 1, r)
    
    
if __name__ == '__main__':
    line = sys.stdin.readline()
    n, q = line.split()
    n, q = int(n), int(q)
    rmq = RSQ(n)
    
    for i in range(q):
        line = sys.stdin.readline()
        op, a, b = line.split()
        op, a, b = int(op), int(a), int(b)
        if op == 0: 
            rmq.update(a, b)
        else: 
            sys.stdout.write(str(rmq.query(a, b + 1)) + '\n')
    

### FIXED CODE ###

import sys
import itertools

class RSQ:
    def __init__(self, n):
        self.sz = 1
        self.inf = (1 << 31) - 1
        while self.sz <= n: self.sz = self.sz << 1
        self.dat = [0] * (2 * self.sz - 1)
    
    def update(self, idx, x):
        idx += self.sz - 1
        self.dat[idx] += x
        while idx > 0:
            idx = (idx - 1) >> 1
            self.dat[idx] += x
            
    def query(self, a, b):
        return self.query_help(a, b, 0, 0, self.sz)
            
    def query_help(self, a, b, k, l, r):
        if r <= a or b <= l:
            return 0
        elif a <= l and r <= b:
            return self.dat[k]
        else:
            return self.query_help(a, b, 2 * k + 1, l, (l + r)>>1) + \
                    self.query_help(a, b, 2 * k + 2, (l + r) >> 1, r)
    
    
if __name__ == '__main__':
    line = sys.stdin.readline()
    n, q = line.split()
    n, q = int(n), int(q)
    rmq = RSQ(n)
    
    for i in range(q):
        line = sys.stdin.readline()
        op, a, b = line.split()
        op, a, b = int(op), int(a), int(b)
        if op == 0: 
            rmq.update(a, b)
        else: 
            sys.stdout.write(str(rmq.query(a, b + 1)) + '\n')
while True:
    _=input()
    if _ == '-':
        break
    for i in range(int(input())):
        l=int(input())
        _=_[l:]+[:l]
    print(_)    


### FIXED CODE ###

while True:
    _=input()
    if _ == '-':
        break
    for i in range(int(input())):
        l=int(input())
        _=_[l:]+_[:l]
    print(_)
x, y, a, b, c = map(int, input().split())
arrayP = list(map(int, input().split()))
arrayQ = list(map(int, input().split()))
arrayR = list(map(int, input().split()))
arrayP.sort(reverse=True)
arrayQ.sort(reverse=True)
arrayR.sort(reverse=True)
arrayAns = []
for i in range(x):
    arrayAns.append(int(arrayP[i]))
for i in range(y):
    arrayAns.append(int(arrayQ[i]))
arrayAns.sort()
for i in range(min(len(arrayR), len(arrayAns)):
    if arrayAns[i] <= int(arrayR[i]):
        arrayAns[i] = int(arrayR[i])
    else:
        break
print(sum(arrayAns))


### FIXED CODE ###

x, y, a, b, c = map(int, input().split())
arrayP = list(map(int, input().split()))
arrayQ = list(map(int, input().split()))
arrayR = list(map(int, input().split()))
arrayP.sort(reverse=True)
arrayQ.sort(reverse=True)
arrayR.sort(reverse=True)
arrayAns = []
for i in range(x):
    arrayAns.append(int(arrayP[i]))
for i in range(y):
    arrayAns.append(int(arrayQ[i]))
arrayAns.sort()
for i in range(min(len(arrayR), len(arrayAns))):
    if arrayAns[i] <= int(arrayR[i]):
        arrayAns[i] = int(arrayR[i])
    else:
        break
print(sum(arrayAns))
a,b,c=[int(i) for i in input().split()]
prnit(a*b/2)

### FIXED CODE ###

a,b,c=[int(i) for i in input().split()]
print((a*b)//2)
from functools import lru_cache

H,N = map(int,input().split())
atk=[]
MP=[]
arr=[]
for i in range(N):
  n,a=input().split()
  arr.append([int(n),int(a)])
arr.sort()

for i in range(N):
  atk.append(arr[i][0])
  MP.append(arr[i][1])

@lru_cache(maxsize=1000000000)
def fx(H):
  if H <= 0:
    return 0
  arr = []
  for i in range(len(atk)):
    c = int(H - atk[i])
    b = int(fx(c) + MP[i])
    arr.append(b)
  return min(arr)

a = fx(H)
print(a)

### FIXED CODE ###

def knapsack(N,W,weight,value):
  #初期化
  inf=float("inf")
  dp=[[inf for i in range(W+1)] for j in range(N+1)]
  dp[0][0]= 0
  #DP
  for i in range(N):
    for w in range(W+1):
      if 0 <= w-weight[i]: #dp[i][w-weight[i]の状態にi番目の荷物が入る可能性がある
        dp[i+1][w]=min(dp[i+1][w-weight[i]]+value[i], dp[i][w])
      else:
        dp[i+1][w]=dp[i][w]
  return dp
 
H,N = map(int,input().split())
 
weight=[]
value=[]
for i in range(N):
    n,a=input().split()
    weight.append(int(n))
    value.append(int(a))
MAX = max(weight)
dp = knapsack(N,H+MAX,weight,value)
 
print(min(dp[N][H:H+MAX]))
N = int(input())
K = int(input())
while(1):
    new_N = abs(N-K)
    if new_N >= N:
        print(N)
        break
    else:
        N=new_N

### FIXED CODE ###

N, K = map(int, input().split())
if N >= 2*K:
    s = N // K
    print(min(abs(N - s * K), abs(N- (s+1) * K)))
else:
    print(min(abs(N-K), abs(abs(N-K)-K)))
n = int(input())
s = input()
S = len(s)
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"]
m = "ABCDEFGHIJKLMNOQPRSTUVWXYZ"
old_word = 0
new_word = 0
ans = []
#print(S)
#print(l[n])
#print(m[n])

for i in range(S):
    old_word = l.index(s[i])
    #print(old_word)
    new_word = old_word + n
    print(new_word)
    if new_word > 25:
        new_word = new_word - 26
    ans.append(l[new_word])


#print(l.index("B"))
print(ans)


### FIXED CODE ###

s = input()
List = ["SUN","MON","TUE","WED","THU","FRI","SAT"]
#print(List.index(s))
print(7-List.index(s))
import numpy as np

first_input = map(lambda x:int(x), input().split(" "))
#second_input = input()

print(str(first_input[2])+" "+str(first_input[0])+" "+str(first_input[1]))


### FIXED CODE ###


first_input = list(map(lambda x:int(x), input().split(" ")))
#second_input = input()

print(str(first_input[2])+" "+str(first_input[0])+" "+str(first_input[1]))
N = int(input())
arr = list(map(int, input().split()))
for i in range(min(N,25)):
    if arr[i] > 2**i:
        print(-1)
        exit()
sum_arr = [0]*N
sum_arr[0] = arr[-1]
for i in range(1,N):
    sum_arr[i] = sum_arr[i-1]+arr[N-i]
sum_arr = sum_arr[::-1]
ans = [0]*(N+1)
ans[0] = 1
for i in range(1,N+1):
    if ans[i-1]-arr[i-1] < 0:
        print(-1)
        exit()
    if (ans[i-1]-arr[i-1])*2 <= sum_arr[i-1]:
        tmp = (ans[i-1]-arr[i-1])*2
    else:
        tmp = sum_arr[i-1]
    ans[i] = tmp
print(ans)

### FIXED CODE ###

N = int(input())
arr = list(map(int, input().split()))
if N == 0:
    if arr[0] == 1:
        print(1)
    else:
        print(-1)
    exit()
else:
    if arr[0] != 0:
        print(-1)
        exit()
sum_arr = [0]*N
sum_arr[0] = arr[-1]
for i in range(1,N):
    sum_arr[i] = sum_arr[i-1]+arr[N-i]
sum_arr = sum_arr[::-1]
ans = [0]*(N+1)
ans[0] = 1
for i in range(1,N+1):
    if ans[i-1]-arr[i-1] < 0:
        print(-1)
        exit()
    tmp = min((ans[i-1]-arr[i-1])*2,sum_arr[i-1])
    ans[i] = tmp
for i in range(min(25,N+1)):
    if ans[i] > 2**i:
        print(-1)
        exit()
if ans[N] != arr[-1]:
    print(-1)
    exit()
print(sum(ans))
import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""


n = input().split()[:-1]

if n[-1] == "s":
    print(n + "es")
else:
    print(n + "s")

### FIXED CODE ###

import sys,collections as cl,bisect as bs
sys.setrecursionlimit(100000)
input = sys.stdin.readline
mod = 10**9+7
Max = sys.maxsize
def l(): #intのlist
    return list(map(int,input().split()))
def m(): #複数文字
    return map(int,input().split())
def onem(): #Nとかの取得
    return int(input())
def s(x): #圧縮
    a = []
    if len(x) == 0:
        return []
    aa = x[0]
    su = 1
    for i in range(len(x)-1):
        if aa != x[i+1]:
            a.append([aa,su])
            aa = x[i+1]
            su = 1
        else:
            su += 1
    a.append([aa,su])
    return a
def jo(x): #listをスペースごとに分ける
    return " ".join(map(str,x))
def max2(x): #他のときもどうように作成可能
    return max(map(max,x))
def In(x,a): #aがリスト(sorted)
    k = bs.bisect_left(a,x)
    if k != len(a) and a[k] ==  x:
        return True
    else:
        return False

def pow_k(x, n):
    ans = 1
    while n:
        if n % 2:
            ans *= x
        x *= x
        n >>= 1
    return ans

"""
def nibu(x,n,r):
    ll = 0
    rr = r
    while True:
        mid = (ll+rr)//2

    if rr == mid:
        return ll
    if (ここに評価入れる):
        rr = mid
    else:
        ll = mid+1
"""


n = input()[:-1]

if n[-1] == "s":
    print(n + "es")
else:
    print(n + "s")
N = int(input())
L = sorted(list(map(int,input())))[::-1]
if L[0] >= sum(L[1:]) :
  print("No")
else:
  print("Yes")

### FIXED CODE ###

N = int(input())
L = sorted(list(map(int,input().split())))[::-1]
if L[0] >= sum(L[1:]) :
  print("No")
else:
  print("Yes")
s=input()
le=len(s)
lis=[]
for i in range(0,le):
  if s[i]!="A" and s[i]!="C" and s[i]!="T" and s[i]!="G":
    lis.append(i)
lo=0
for j in range(0,len(lis)-1):
  if lis[j+1]-lis[j]-1>=lo:
    lo=lis[j+1]-lis[j]-1
#print(lo)
if lis[0]>=lo:
  lo=lis[0]
#print(lo)
if le-lis[-1]-1>=lo:
  lo=le-lis[-1]-1
#print(lo)
print(lo)

### FIXED CODE ###

s=input()
le=len(s)
lis=[]
for i in range(0,le):
  if s[i]!="A" and s[i]!="C" and s[i]!="T" and s[i]!="G":
    lis.append(i)
lo=0
for j in range(0,len(lis)-1):
  if lis[j+1]-lis[j]-1>=lo:
    lo=lis[j+1]-lis[j]-1
if bool(lis):
  if lis[0]>=lo:
    lo=lis[0]
  if le-lis[-1]-1>=lo:
    lo=le-lis[-1]-1
  print(lo)
else:
  print(le)
import sys

sys.setrecursionlimit(10**9)

def f(b, n):
    if n < b:
        return n
    else:
        q, r = divmod(n, b)
        return f(b, q) + r

n = int(input())
s = int(input())
if n == s:
    print(n+1)
else:
    b = 2
    while b*b <= n:
        if f(b, n) == s:
            print(b)
            break
        b += 1
    else:
        p = 1
        ans = 10**13
        while p*p <= n:
            b = (n - s) // p + 1
            if f(b, n) == s:
                ans = min(ans, b)
            p += 1
        if ans == 10**13:
            print(-1)
        else:
            print(ans)

### FIXED CODE ###

def f(b, n):
    if n < b:
        return n
    else:
        q, r = divmod(n, b)
        return f(b, q) + r

n = int(input())
s = int(input())
if n == s:
    print(n+1)
else:
    b = 2
    while b*b <= n:
        if f(b, n) == s:
            print(b)
            break
        b += 1
    else:
        p = 1
        ans = 10**13
        while p*p <= n:
            b = (n - s) // p + 1
            if p < b and s - p < b and f(b, n) == s:
                ans = min(ans, b)
            p += 1
        if ans == 10**13:
            print(-1)
        else:
            print(ans)
n=int(input())
h=list(map(int,input().split()))
dp=[float('inf')]*n
dp[0]=0

def rec(i):
    if dp[i]<float('inf'):
        return dp[i]
    
    if i==0:
        return 0
    
    res=float('inf')#最小に更新する
    
    res=min(res,rec(i-1)+abs(h[i]-h[i-1]))
    if i>1:
        #i-2が負になる場合を避ける
        res=min(res,rec(i-2)+abs(h[i]-h[i-2]))
    
    return res
    
    
print(rec(n-1))

### FIXED CODE ###

n=int(input())
h=list(map(int,input().split()))

dp=[float('inf')]*n
dp[0]=0#初期条件を設定

for i in range(1,n):
    dp[i]=min(dp[i],dp[i-1]+abs(h[i]-h[i-1]))
    #i=1の時i-2<0となるので先にここを計算する
    if i>=2:
        dp[i]=min(dp[i],dp[i-2]+abs(h[i]-h[i-2]))
        
print(dp[-1])
import math


def calc_minkowski_distance(data_x, data_y, types):
    # ???????´???????????¨???????map???????????¬??????????????????????????¨????????¨????????§?¶???????????????????????????§????????????????????????
    distance = list(map(lambda x, y:abs(x - y), data_x, data_y))

    results = []
    for t in types:
        if t == math.inf:
            results.append(max(distance))
        else:
            temp = map(lambda x:math.pow(x, t), distance)
            total = sum(temp)
            results.append(math.pow(total, 1.0/t))
    return results


if __name__ == '__main__':
    # ??????????????\???
    # data_x = [1, 2, 3]
    # data_y = [2, 0, 4]
    num = int(input())
    data_x = [int(x) for x in input().split(' ')]
    data_y = [int(x) for x in input().split(' ')]

    # ???????????????
    types = [1, 2, 3, math.inf]
    results = calc_minkowski_distance(data_x, data_y, types)

    # ???????????¨???
    for r in results:
        print('{0:.6f}'.format(r))

### FIXED CODE ###

import math


def calc_minkowski_distance(data_x, data_y, types):
    # ???????´???????????¨???????map???????????¬??????????????????????????¨????????¨????????§?¶???????????????????????????§????????????????????????
    distance = list(map(lambda x, y:abs(x - y), data_x, data_y))

    results = []
    for t in types:
        if t == 'Inf':
            results.append(max(distance))
        else:
            temp = map(lambda x:math.pow(x, t), distance)
            total = sum(temp)
            results.append(math.pow(total, 1.0/t))
    return results


if __name__ == '__main__':
    # ??????????????\???
    # data_x = [1, 2, 3]
    # data_y = [2, 0, 4]
    num = int(input())
    data_x = [int(x) for x in input().split(' ')]
    data_y = [int(x) for x in input().split(' ')]

    # ???????????????
    types = [1, 2, 3, 'Inf']  # math.inf???python3.5??\?????????
    results = calc_minkowski_distance(data_x, data_y, types)

    # ???????????¨???
    for r in results:
        print('{0:.8f}'.format(r))