import re

S = eval(input())

r = re.findall('[ACTG]+', S)

print((max([len(_) for _ in r], default=0)))
import itertools

S = eval(input())

ans = 0

for i,j in itertools.combinations(list(range(len(S)+1)), 2):

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

        ans = max(ans, len(S[i:j]))

print(ans)

import re

S = eval(input())
r = re.findall("[ACTG]+", S)
print((max([len(_) for _ in r], default=0)))

import itertools

S = eval(input())
ans = 0
for i, j in itertools.combinations(list(range(len(S) + 1)), 2):
    if all("ACTG".count(c) == 1 for c in S[i:j]):
        ans = max(ans, len(S[i:j]))
print(ans)

-import re +import itertools -r = re.findall("[ACTG]+", S) -print((max([len(_) for _ in r], default=0))) +ans = 0 +for i, j in itertools.combinations(list(range(len(S) + 1)), 2): +    if all("ACTG".count(c) == 1 for c in S[i:j]): +        ans = max(ans, len(S[i:j])) +print(ans)