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



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()



temp = 0

ans = 0



for char in s:

    if char 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


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()
temp = 0
ans = 0
for char in s:
    if char in "ACGT":
        temp += 1
    else:
        temp = 0
    ans = max(ans, temp)
print(ans)

-from collections import deque -from itertools import * +temp = 0 -temp = 0 -for s_s in s: -    if s_s in "ACGT": +for char in s: +    if char in "ACGT":