# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0

# abcde	s=input()	s='abcde'

# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']

# 5(1つだけ)	a=int(input())	a=5

# 1 2	| x,y = s_inpl()   |	x=1,y=2

# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']

# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]

# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']



# INPUT

# 3

# hoge

# foo

# bar

# ANSWER

# n=int(input())

# string_list=[input() for i in range(n)]



import math

import numpy as np

import copy

from collections import defaultdict, Counter

from itertools import product

from bisect import bisect_left, bisect_right



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

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



S = eval(input())



ans = 0

tmp = 0

for si in S:

    if si == "A" or si == "T" or si == "C" or si == "G":

        tmp += 1

    else:

        if tmp > ans:

            ans = tmp



        tmp = 0

    if tmp > ans:

        ans = tmp



print(ans)
import math

import copy

from operator import mul

from functools import reduce

from collections import defaultdict

from collections import Counter

from collections import deque

# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)

from itertools import product

# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)

from itertools import permutations

# 組み合わせ {}_len(seq) C_n: combinations(seq, n)

from itertools import combinations

from bisect import bisect_left, bisect_right

# import numpy as np



def inside(y, x, H, W):

    return 0 <= y < H and 0 <= x < W



# 四方向: 右, 下, 左, 上

dy = [0, -1, 0, 1]

dx = [1, 0, -1, 0]



def i_inpl(): return int(eval(input()))

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

INF = float("inf")



######

# URL: https://atcoder.jp/contests/abc122/tasks/abc122_b

######



def main():

    S = eval(input())

    ans = 0

    for begin in range(len(S)):

        for end in range(begin, len(S)):

            if sum([ "ACGT".count(s) for s in S[begin:end+1]]) == len(S[begin:end+1]):

                ans = max(ans, len(S[begin:end+1]))

    print(ans)



if __name__ == "__main__":

    main()
# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0
# abcde	s=input()	s='abcde'
# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e']
# 5(1つだけ)	a=int(input())	a=5
# 1 2	| x,y = s_inpl()   |	x=1,y=2
# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n']
# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n]
# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF']
# INPUT
# 3
# hoge
# foo
# bar
# ANSWER
# n=int(input())
# string_list=[input() for i in range(n)]
import math
import numpy as np
import copy
from collections import defaultdict, Counter
from itertools import product
from bisect import bisect_left, bisect_right


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


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


S = eval(input())
ans = 0
tmp = 0
for si in S:
    if si == "A" or si == "T" or si == "C" or si == "G":
        tmp += 1
    else:
        if tmp > ans:
            ans = tmp
        tmp = 0
    if tmp > ans:
        ans = tmp
print(ans)

import math
import copy
from operator import mul
from functools import reduce
from collections import defaultdict
from collections import Counter
from collections import deque

# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B)
from itertools import product

# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n)
from itertools import permutations

# 組み合わせ {}_len(seq) C_n: combinations(seq, n)
from itertools import combinations
from bisect import bisect_left, bisect_right

# import numpy as np
def inside(y, x, H, W):
    return 0 <= y < H and 0 <= x < W


# 四方向: 右, 下, 左, 上
dy = [0, -1, 0, 1]
dx = [1, 0, -1, 0]


def i_inpl():
    return int(eval(input()))


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


INF = float("inf")
######
# URL: https://atcoder.jp/contests/abc122/tasks/abc122_b
######
def main():
    S = eval(input())
    ans = 0
    for begin in range(len(S)):
        for end in range(begin, len(S)):
            if sum(["ACGT".count(s) for s in S[begin : end + 1]]) == len(
                S[begin : end + 1]
            ):
                ans = max(ans, len(S[begin : end + 1]))
    print(ans)


if __name__ == "__main__":
    main()

-# https://qiita.com/_-_-_-_-_/items/34f933adc7be875e61d0 -# abcde	s=input()	s='abcde' -# abcde	s=list(input())	s=['a', 'b', 'c', 'd', 'e'] -# 5(1つだけ)	a=int(input())	a=5 -# 1 2	| x,y = s_inpl()   |	x=1,y=2 -# 1 2 3 4 5 ... n 　	li = input().split()	li=['1','2','3',...,'n'] -# 1 2 3 4 5 ... n 　	li = inpl()	li=[1,2,3,4,5,...,n] -# FFFTFTTFF 　	li = input().split('T')	li=['FFF', 'F', '', 'FF'] -# INPUT -# 3 -# hoge -# foo -# bar -# ANSWER -# n=int(input()) -# string_list=[input() for i in range(n)] -import numpy as np -from collections import defaultdict, Counter +from operator import mul +from functools import reduce +from collections import defaultdict +from collections import Counter +from collections import deque + +# 直積 A={a, b, c}, B={d, e}:のとき，A×B={(a,d),(a,e),(b,d),(b,e),(c,d),(c,e)}: product(A, B) + +# 階乗 P!: permutations(seq), 順列 {}_len(seq) P_n: permutations(seq, n) +from itertools import permutations + +# 組み合わせ {}_len(seq) C_n: combinations(seq, n) +from itertools import combinations +# import numpy as np +def inside(y, x, H, W): +    return 0 <= y < H and 0 <= x < W -def s_inpl(): + +# 四方向: 右, 下, 左, 上 +dy = [0, -1, 0, 1] +dx = [1, 0, -1, 0] + + +def i_inpl(): +    return int(eval(input())) + + +def l_inpl(): -def inpl(): -    return list(map(int, input().split())) +INF = float("inf") +###### +# URL: https://atcoder.jp/contests/abc122/tasks/abc122_b +###### +def main(): +    S = eval(input()) +    ans = 0 +    for begin in range(len(S)): +        for end in range(begin, len(S)): +            if sum(["ACGT".count(s) for s in S[begin : end + 1]]) == len( +                S[begin : end + 1] +            ): +                ans = max(ans, len(S[begin : end + 1])) +    print(ans) -S = eval(input()) -ans = 0 -tmp = 0 -for si in S: -    if si == "A" or si == "T" or si == "C" or si == "G": -        tmp += 1 -    else: -        if tmp > ans: -            ans = tmp -        tmp = 0 -    if tmp > ans: -        ans = tmp -print(ans) +if __name__ == "__main__": +    main()