import re

ptn = re.compile(r"(A|C|T|G)*")



S = eval(input())

T = set()

xx=ptn.match("FAFA")

for i in range(len(S)):

  for j in range(len(S)):

    x = ptn.match(S[i:i+j+1])

    if(x.group(0)):

      T.add(len(x.group(0)))

try:

  print((max(T)))

except:

  print((0))
import re

ptn = re.compile(r"(A|C|G|T)*")



S = eval(input())



ans = 0

for i in range(len(S)):

  for j in range(len(S)):

    x = ptn.match(S[i:i+j+1]).group(0)

    if(x):

      ans = max(ans, len(x))

print(ans)
import re

ptn = re.compile(r"(A|C|T|G)*")
S = eval(input())
T = set()
xx = ptn.match("FAFA")
for i in range(len(S)):
    for j in range(len(S)):
        x = ptn.match(S[i : i + j + 1])
        if x.group(0):
            T.add(len(x.group(0)))
try:
    print((max(T)))
except:
    print((0))

import re

ptn = re.compile(r"(A|C|G|T)*")
S = eval(input())
ans = 0
for i in range(len(S)):
    for j in range(len(S)):
        x = ptn.match(S[i : i + j + 1]).group(0)
        if x:
            ans = max(ans, len(x))
print(ans)

-ptn = re.compile(r"(A|C|T|G)*") +ptn = re.compile(r"(A|C|G|T)*") -T = set() -xx = ptn.match("FAFA") +ans = 0 -        x = ptn.match(S[i : i + j + 1]) -        if x.group(0): -            T.add(len(x.group(0))) -try: -    print((max(T))) -except: -    print((0)) +        x = ptn.match(S[i : i + j + 1]).group(0) +        if x: +            ans = max(ans, len(x)) +print(ans)