import re

pattern = re.compile('[ACGT]+')

S = eval(input())

print((len(max(re.findall(pattern, S), key=len, default=''))))
S = eval(input())

N = len(S)

ans = 0

for i in range(N):

  for j in range(i, N):

    if all('ACGT'.count(c)==1 for c in S[i:j+1]):

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

print(ans)
import re

pattern = re.compile("[ACGT]+")
S = eval(input())
print((len(max(re.findall(pattern, S), key=len, default=""))))

S = eval(input())
N = len(S)
ans = 0
for i in range(N):
    for j in range(i, N):
        if all("ACGT".count(c) == 1 for c in S[i : j + 1]):
            ans = max(ans, j - i + 1)
print(ans)

-import re - -pattern = re.compile("[ACGT]+") -print((len(max(re.findall(pattern, S), key=len, default="")))) +N = len(S) +ans = 0 +for i in range(N): +    for j in range(i, N): +        if all("ACGT".count(c) == 1 for c in S[i : j + 1]): +            ans = max(ans, j - i + 1) +print(ans)