S = eval(input())



from collections import deque



answer = 0

queue = deque()

target = {'A','C','G','T'}

for s in S:

    if s in target:

        queue.append(s)

    else:

        answer = max(answer, len(queue))

        queue.clear()

answer = max(answer, len(queue))

print(answer)

# coding: utf-8

import sys



sr = lambda: sys.stdin.readline().rstrip()

ir = lambda: int(sr())

lr = lambda: list(map(int, sr().split()))



se = {'A', 'C', 'G', 'T'}

S = sr()

cand = []

answer = []

for s in S:

    if s in se:

        cand.append(s)

    else:

        if len(cand) > len(answer):

            answer = cand

        cand = []



if len(cand) > len(answer):

    answer = cand

print((len(answer)))

S = eval(input())
from collections import deque

answer = 0
queue = deque()
target = {"A", "C", "G", "T"}
for s in S:
    if s in target:
        queue.append(s)
    else:
        answer = max(answer, len(queue))
        queue.clear()
answer = max(answer, len(queue))
print(answer)

# coding: utf-8
import sys

sr = lambda: sys.stdin.readline().rstrip()
ir = lambda: int(sr())
lr = lambda: list(map(int, sr().split()))
se = {"A", "C", "G", "T"}
S = sr()
cand = []
answer = []
for s in S:
    if s in se:
        cand.append(s)
    else:
        if len(cand) > len(answer):
            answer = cand
        cand = []
if len(cand) > len(answer):
    answer = cand
print((len(answer)))

-S = eval(input()) -from collections import deque +# coding: utf-8 +import sys -answer = 0 -queue = deque() -target = {"A", "C", "G", "T"} +sr = lambda: sys.stdin.readline().rstrip() +ir = lambda: int(sr()) +lr = lambda: list(map(int, sr().split())) +se = {"A", "C", "G", "T"} +S = sr() +cand = [] +answer = [] -    if s in target: -        queue.append(s) +    if s in se: +        cand.append(s) -        answer = max(answer, len(queue)) -        queue.clear() -answer = max(answer, len(queue)) -print(answer) +        if len(cand) > len(answer): +            answer = cand +        cand = [] +if len(cand) > len(answer): +    answer = cand +print((len(answer)))