import itertools

import numpy as np

import sys

MAX_INT = int(10e10)

MIN_INT = -MAX_INT

mod = 1000000007

def IL(): return list(map(int,input().split()))

def SL(): return input().split()

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

def S(): return eval(input())



s = S()

acgt = ["A","C","G","T"]



cnt = 0

ans = 0

for i in range(len(s)):

    if s[i] in acgt:

        cnt += 1

    else:

        cnt = 0

    ans = max(ans,cnt)



print(ans)
import sys

import itertools

import math

from collections import deque

MAX_INT = int(10e15)

MIN_INT = -MAX_INT

mod = 1000000007

sys.setrecursionlimit(1000000)

def IL(): return list(map(int,input().split()))

def SL(): return input().split()

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

def S(): return eval(input())



s = S()

N = len(s)

t = list("ACGT")



ans = 0

cnt = 0

for i in range(N):

  if s[i] in t:

    cnt += 1

  else:

    ans = max(ans, cnt)

    cnt = 0

else:

  ans = max(ans, cnt)



print(ans)
import itertools
import numpy as np
import sys

MAX_INT = int(10e10)
MIN_INT = -MAX_INT
mod = 1000000007


def IL():
    return list(map(int, input().split()))


def SL():
    return input().split()


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


def S():
    return eval(input())


s = S()
acgt = ["A", "C", "G", "T"]
cnt = 0
ans = 0
for i in range(len(s)):
    if s[i] in acgt:
        cnt += 1
    else:
        cnt = 0
    ans = max(ans, cnt)
print(ans)

import sys
import itertools
import math
from collections import deque

MAX_INT = int(10e15)
MIN_INT = -MAX_INT
mod = 1000000007
sys.setrecursionlimit(1000000)


def IL():
    return list(map(int, input().split()))


def SL():
    return input().split()


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


def S():
    return eval(input())


s = S()
N = len(s)
t = list("ACGT")
ans = 0
cnt = 0
for i in range(N):
    if s[i] in t:
        cnt += 1
    else:
        ans = max(ans, cnt)
        cnt = 0
else:
    ans = max(ans, cnt)
print(ans)

+import sys -import numpy as np -import sys +import math +from collections import deque -MAX_INT = int(10e10) +MAX_INT = int(10e15) +sys.setrecursionlimit(1000000) -acgt = ["A", "C", "G", "T"] +N = len(s) +t = list("ACGT") +ans = 0 -ans = 0 -for i in range(len(s)): -    if s[i] in acgt: +for i in range(N): +    if s[i] in t: +        ans = max(ans, cnt) +else: