import re

ptn = re.compile(r"(A|C|G|T)*")



S = eval(input())



ans = 0

for i in range(len(S)):

  for j in range(len(S)):

    x = ptn.match(S[i:i+j+1]).group(0)

    if(x):

      ans = max(ans, len(x))

print(ans)
import sys



stdin = sys.stdin



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

ni = lambda : int(ns())

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

sys.setrecursionlimit(10 ** 7)



def check(In):

    return In != "A" and In != "C" and In != "G" and In != "T"



def main():

    s = ns()



    count = 0

    ans = 0

    for i in range(len(s)):

        if check(s[i]):

            count = 0

        else:

            count += 1

            ans = max(ans, count)

    print(ans)



if __name__ == '__main__':

    main()
import re

ptn = re.compile(r"(A|C|G|T)*")
S = eval(input())
ans = 0
for i in range(len(S)):
    for j in range(len(S)):
        x = ptn.match(S[i : i + j + 1]).group(0)
        if x:
            ans = max(ans, len(x))
print(ans)

import sys

stdin = sys.stdin
ns = lambda: stdin.readline().rstrip()
ni = lambda: int(ns())
na = lambda: list(map(int, stdin.readline().split()))
sys.setrecursionlimit(10**7)


def check(In):
    return In != "A" and In != "C" and In != "G" and In != "T"


def main():
    s = ns()
    count = 0
    ans = 0
    for i in range(len(s)):
        if check(s[i]):
            count = 0
        else:
            count += 1
            ans = max(ans, count)
    print(ans)


if __name__ == "__main__":
    main()

-import re +import sys -ptn = re.compile(r"(A|C|G|T)*") -S = eval(input()) -ans = 0 -for i in range(len(S)): -    for j in range(len(S)): -        x = ptn.match(S[i : i + j + 1]).group(0) -        if x: -            ans = max(ans, len(x)) -print(ans) +stdin = sys.stdin +ns = lambda: stdin.readline().rstrip() +ni = lambda: int(ns()) +na = lambda: list(map(int, stdin.readline().split())) +sys.setrecursionlimit(10**7) + + +def check(In): +    return In != "A" and In != "C" and In != "G" and In != "T" + + +def main(): +    s = ns() +    count = 0 +    ans = 0 +    for i in range(len(s)): +        if check(s[i]): +            count = 0 +        else: +            count += 1 +            ans = max(ans, count) +    print(ans) + + +if __name__ == "__main__": +    main()