import itertools

import math

import fractions

import functools

import copy

s = eval(input())



maximum = 0 

count = 0



for i in range(len(s)):

    if s[i] == "A" or s[i] == "C" or s[i] == "G" or s[i] == "T":

        count += 1

        maximum = max(maximum,count)

    else:

        count = 0



print(maximum)
def main():

    # n = int(input())

    # n, m = map(int, input().split())

    # a = list(map(int, input().split()))

    s = eval(input())

    # h = [int(input()) for _ in rane(n)]

    count = 0

    maxi = 0

    for string in s:

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

            count += 1

            maxi= max(count, maxi)

        else:

            count = 0



    print(maxi)





if __name__ == '__main__':

    main()

import itertools
import math
import fractions
import functools
import copy

s = eval(input())
maximum = 0
count = 0
for i in range(len(s)):
    if s[i] == "A" or s[i] == "C" or s[i] == "G" or s[i] == "T":
        count += 1
        maximum = max(maximum, count)
    else:
        count = 0
print(maximum)

def main():
    # n = int(input())
    # n, m = map(int, input().split())
    # a = list(map(int, input().split()))
    s = eval(input())
    # h = [int(input()) for _ in rane(n)]
    count = 0
    maxi = 0
    for string in s:
        if string == "A" or string == "C" or string == "G" or string == "T":
            count += 1
            maxi = max(count, maxi)
        else:
            count = 0
    print(maxi)


if __name__ == "__main__":
    main()

-import itertools -import math -import fractions -import functools -import copy +def main(): +    # n = int(input()) +    # n, m = map(int, input().split()) +    # a = list(map(int, input().split())) +    s = eval(input()) +    # h = [int(input()) for _ in rane(n)] +    count = 0 +    maxi = 0 +    for string in s: +        if string == "A" or string == "C" or string == "G" or string == "T": +            count += 1 +            maxi = max(count, maxi) +        else: +            count = 0 +    print(maxi) -s = eval(input()) -maximum = 0 -count = 0 -for i in range(len(s)): -    if s[i] == "A" or s[i] == "C" or s[i] == "G" or s[i] == "T": -        count += 1 -        maximum = max(maximum, count) -    else: -        count = 0 -print(maximum) + +if __name__ == "__main__": +    main()