import re

ans = list(map(len, re.findall("[ACGT]*", eval(input()))))

print((max(ans)))
S = eval(input())



ans = 0

for i in range(len(S)):

  for j in range(i, len(S)):

    T = S[i:j+1]

    if set(T) <= set("ACGT"):

      ans = max(ans, j-i+1)

print(ans)      
import re

ans = list(map(len, re.findall("[ACGT]*", eval(input()))))
print((max(ans)))

S = eval(input())
ans = 0
for i in range(len(S)):
    for j in range(i, len(S)):
        T = S[i : j + 1]
        if set(T) <= set("ACGT"):
            ans = max(ans, j - i + 1)
print(ans)

-import re - -ans = list(map(len, re.findall("[ACGT]*", eval(input())))) -print((max(ans))) +S = eval(input()) +ans = 0 +for i in range(len(S)): +    for j in range(i, len(S)): +        T = S[i : j + 1] +        if set(T) <= set("ACGT"): +            ans = max(ans, j - i + 1) +print(ans)