s = eval(input())

ans = 0

for i in range(len(s) - 1):

    if s[i] not in {'A', 'C', 'G', 'T'}:

        continue

    length = 1

    for j in range(i + 1, len(s)):

        if s[j] not in {'A', 'C', 'G', 'T'}:

            break

        length += 1

    ans = max(ans, length)

if len(s) == 1:

    ans = 0 if s not in {'A', 'C', 'G', 'T'} else 1

print(ans)
import sys

s = sys.stdin.readline()

ans = 0

for i in range(len(s)):

    # print(f'{s[i]=}')

    if s[i] not in {'A', 'C', 'G', 'T'}: continue

    length = 1

    for j in range(i + 1, len(s)):

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

            # print(f'{s[j]=}')

            length += 1

        else: break

    ans = max(ans, length)

    # print(f'{ans=}')

print(ans)
s = eval(input())
ans = 0
for i in range(len(s) - 1):
    if s[i] not in {"A", "C", "G", "T"}:
        continue
    length = 1
    for j in range(i + 1, len(s)):
        if s[j] not in {"A", "C", "G", "T"}:
            break
        length += 1
    ans = max(ans, length)
if len(s) == 1:
    ans = 0 if s not in {"A", "C", "G", "T"} else 1
print(ans)

import sys

s = sys.stdin.readline()
ans = 0
for i in range(len(s)):
    # print(f'{s[i]=}')
    if s[i] not in {"A", "C", "G", "T"}:
        continue
    length = 1
    for j in range(i + 1, len(s)):
        if s[j] in {"A", "C", "G", "T"}:
            # print(f'{s[j]=}')
            length += 1
        else:
            break
    ans = max(ans, length)
    # print(f'{ans=}')
print(ans)

-s = eval(input()) +import sys + +s = sys.stdin.readline() -for i in range(len(s) - 1): +for i in range(len(s)): +    # print(f'{s[i]=}') -        if s[j] not in {"A", "C", "G", "T"}: +        if s[j] in {"A", "C", "G", "T"}: +            # print(f'{s[j]=}') +            length += 1 +        else: -        length += 1 -if len(s) == 1: -    ans = 0 if s not in {"A", "C", "G", "T"} else 1 +    # print(f'{ans=}')