S = input().rstrip()

N = len(S)

ans = 0

from collections import Counter

for i in range(N):

    for j in range(i + 1, N + 1):

        flag = 1

        s = S[i:j]

        c = Counter(s)

        for k in list(c.keys()):

            if k != "A" and k != "C" and k != "G" and k != "T":

                flag = 0

                break

        if flag:

            ans = max(ans, len(s))       



print(ans)
import sys

input = lambda: sys.stdin.readline().rstrip("\r\n")



s = eval(input())

n = len(s)

ans = 0

acgt = set(['A', 'C', 'G', 'T'])

for i in range(n):

    for j in range(i + 1, n + 1):

        t = s[i:j]

        flag = 1

        for k in t:

            if k not in acgt:

                flag = 0

                break

        if flag:

            ans = max(ans, len(t))

print(ans)

                
S = input().rstrip()
N = len(S)
ans = 0
from collections import Counter

for i in range(N):
    for j in range(i + 1, N + 1):
        flag = 1
        s = S[i:j]
        c = Counter(s)
        for k in list(c.keys()):
            if k != "A" and k != "C" and k != "G" and k != "T":
                flag = 0
                break
        if flag:
            ans = max(ans, len(s))
print(ans)

import sys

input = lambda: sys.stdin.readline().rstrip("\r\n")
s = eval(input())
n = len(s)
ans = 0
acgt = set(["A", "C", "G", "T"])
for i in range(n):
    for j in range(i + 1, n + 1):
        t = s[i:j]
        flag = 1
        for k in t:
            if k not in acgt:
                flag = 0
                break
        if flag:
            ans = max(ans, len(t))
print(ans)

-S = input().rstrip() -N = len(S) +import sys + +input = lambda: sys.stdin.readline().rstrip("\r\n") +s = eval(input()) +n = len(s) -from collections import Counter - -for i in range(N): -    for j in range(i + 1, N + 1): +acgt = set(["A", "C", "G", "T"]) +for i in range(n): +    for j in range(i + 1, n + 1): +        t = s[i:j] -        s = S[i:j] -        c = Counter(s) -        for k in list(c.keys()): -            if k != "A" and k != "C" and k != "G" and k != "T": +        for k in t: +            if k not in acgt: -            ans = max(ans, len(s)) +            ans = max(ans, len(t))