S = eval(input())

ACGT = ['A', 'C', 'G', 'T']



cnt = 0

maximum = 0

for s in S:

    if s in ACGT:

        cnt += 1

        maximum = max(maximum, cnt)

    else:

        maximum = max(maximum, cnt)

        cnt = 0



print(maximum)

import sys

stdin = sys.stdin

sys.setrecursionlimit(10 ** 7)



i_i = lambda: int(i_s())

i_l = lambda: list(map(int, stdin.readline().split()))

i_s = lambda: stdin.readline().rstrip()



S = i_s()



cnt = 0

ans = 0

for s in S:

    if s in ['A', 'T', 'C', 'G']:

        cnt += 1

    else:

        ans = max(ans, cnt)

        cnt = 0



ans = max(ans, cnt)



print(ans)
S = eval(input())
ACGT = ["A", "C", "G", "T"]
cnt = 0
maximum = 0
for s in S:
    if s in ACGT:
        cnt += 1
        maximum = max(maximum, cnt)
    else:
        maximum = max(maximum, cnt)
        cnt = 0
print(maximum)

import sys

stdin = sys.stdin
sys.setrecursionlimit(10**7)
i_i = lambda: int(i_s())
i_l = lambda: list(map(int, stdin.readline().split()))
i_s = lambda: stdin.readline().rstrip()
S = i_s()
cnt = 0
ans = 0
for s in S:
    if s in ["A", "T", "C", "G"]:
        cnt += 1
    else:
        ans = max(ans, cnt)
        cnt = 0
ans = max(ans, cnt)
print(ans)

-S = eval(input()) -ACGT = ["A", "C", "G", "T"] +import sys + +stdin = sys.stdin +sys.setrecursionlimit(10**7) +i_i = lambda: int(i_s()) +i_l = lambda: list(map(int, stdin.readline().split())) +i_s = lambda: stdin.readline().rstrip() +S = i_s() -maximum = 0 +ans = 0 -    if s in ACGT: +    if s in ["A", "T", "C", "G"]: -        maximum = max(maximum, cnt) -        maximum = max(maximum, cnt) +        ans = max(ans, cnt) -print(maximum) +ans = max(ans, cnt) +print(ans)