s=str(eval(input()))

s=s.replace('A', '1').replace('T', '1').replace("C", "1").replace("G", "1")

l=len(s)

d=0

for i in range(l):

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

    if s[i:k].count("1")==len(s[i:k]):

      d=max(d, len(s[i:k]))

print(d)
def checks(a):

  if a=="C" or a=="T" or a=="G"or a=="A":

    return True

  else:

    return False

s=str(eval(input()))

cnt=0

ans=0

for a in s:

  if checks(a):

    cnt+=1

    ans=max(cnt, ans)

  else:

    cnt=0

print(ans)
s = str(eval(input()))
s = s.replace("A", "1").replace("T", "1").replace("C", "1").replace("G", "1")
l = len(s)
d = 0
for i in range(l):
    for k in range(i, l + 1):
        if s[i:k].count("1") == len(s[i:k]):
            d = max(d, len(s[i:k]))
print(d)

def checks(a):
    if a == "C" or a == "T" or a == "G" or a == "A":
        return True
    else:
        return False


s = str(eval(input()))
cnt = 0
ans = 0
for a in s:
    if checks(a):
        cnt += 1
        ans = max(cnt, ans)
    else:
        cnt = 0
print(ans)

+def checks(a): +    if a == "C" or a == "T" or a == "G" or a == "A": +        return True +    else: +        return False + + -s = s.replace("A", "1").replace("T", "1").replace("C", "1").replace("G", "1") -l = len(s) -d = 0 -for i in range(l): -    for k in range(i, l + 1): -        if s[i:k].count("1") == len(s[i:k]): -            d = max(d, len(s[i:k])) -print(d) +cnt = 0 +ans = 0 +for a in s: +    if checks(a): +        cnt += 1 +        ans = max(cnt, ans) +    else: +        cnt = 0 +print(ans)