import sys

from itertools import combinations

import math





def I(): return int(sys.stdin.readline().rstrip())





def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))





def S(): return sys.stdin.readline().rstrip()





def LS(): return list(sys.stdin.readline().rstrip().split())





s = S()



ans = 0

temp = 0

for a in s:

    if a in 'ACGT':

        temp += 1

    else:

        temp = 0

    ans = max(ans, temp)

print(ans)

import sys

from collections import deque

from itertools import *





def I(): return int(sys.stdin.readline().rstrip())





def LI(): return list(map(int, sys.stdin.readline().rstrip().split()))





def S(): return sys.stdin.readline().rstrip()





def LS(): return list(sys.stdin.readline().rstrip().split())





s = S()



ans = 0

temp = 0

for s_s in s:

    if s_s in 'ACGT':

        temp += 1

    else:

        temp = 0

    ans = max(ans, temp)

print(ans)

import sys
from itertools import combinations
import math


def I():
    return int(sys.stdin.readline().rstrip())


def LI():
    return list(map(int, sys.stdin.readline().rstrip().split()))


def S():
    return sys.stdin.readline().rstrip()


def LS():
    return list(sys.stdin.readline().rstrip().split())


s = S()
ans = 0
temp = 0
for a in s:
    if a in "ACGT":
        temp += 1
    else:
        temp = 0
    ans = max(ans, temp)
print(ans)

import sys
from collections import deque
from itertools import *


def I():
    return int(sys.stdin.readline().rstrip())


def LI():
    return list(map(int, sys.stdin.readline().rstrip().split()))


def S():
    return sys.stdin.readline().rstrip()


def LS():
    return list(sys.stdin.readline().rstrip().split())


s = S()
ans = 0
temp = 0
for s_s in s:
    if s_s in "ACGT":
        temp += 1
    else:
        temp = 0
    ans = max(ans, temp)
print(ans)

-from itertools import combinations -import math +from collections import deque +from itertools import * -for a in s: -    if a in "ACGT": +for s_s in s: +    if s_s in "ACGT":