import math

import itertools

# from collections import deque

# from collections import defaultdict

# import heapq

# import sys

# import bisect

# import numpy as np

# from scipy.special import comb





def main():

    S = eval(input())



    acgt = set(['A', 'C', 'G', 'T'])



    ans = 0

    for i in range(1, len(S) + 1):

        for j in range(len(S) - i + 1):

            if not set(S[j:j + i]) - acgt:

                ans = max(ans, len(S[j:j + i]))



    print(ans)





list(itertools.combinations([1, 2, 3, 4], 2))



if __name__ == '__main__':

    main()

import sys



read = sys.stdin.buffer.read

readline = sys.stdin.buffer.readline

readline_s = sys.stdin.readline

readlines = sys.stdin.buffer.readlines





def main():



    S = eval(input())



    ans = 0

    count = 0

    for i in range(len(S)):

        if S[i] in ('A', 'C', 'G', 'T'):

            count += 1

            ans = max(ans, count)

        else:

            count = 0



    print(ans)





if __name__ == '__main__':

    main()

import math
import itertools

# from collections import deque
# from collections import defaultdict
# import heapq
# import sys
# import bisect
# import numpy as np
# from scipy.special import comb
def main():
    S = eval(input())
    acgt = set(["A", "C", "G", "T"])
    ans = 0
    for i in range(1, len(S) + 1):
        for j in range(len(S) - i + 1):
            if not set(S[j : j + i]) - acgt:
                ans = max(ans, len(S[j : j + i]))
    print(ans)


list(itertools.combinations([1, 2, 3, 4], 2))
if __name__ == "__main__":
    main()

import sys

read = sys.stdin.buffer.read
readline = sys.stdin.buffer.readline
readline_s = sys.stdin.readline
readlines = sys.stdin.buffer.readlines


def main():
    S = eval(input())
    ans = 0
    count = 0
    for i in range(len(S)):
        if S[i] in ("A", "C", "G", "T"):
            count += 1
            ans = max(ans, count)
        else:
            count = 0
    print(ans)


if __name__ == "__main__":
    main()

-import math -import itertools +import sys -# from collections import deque -# from collections import defaultdict -# import heapq -# import sys -# import bisect -# import numpy as np -# from scipy.special import comb +read = sys.stdin.buffer.read +readline = sys.stdin.buffer.readline +readline_s = sys.stdin.readline +readlines = sys.stdin.buffer.readlines + + -    acgt = set(["A", "C", "G", "T"]) -    for i in range(1, len(S) + 1): -        for j in range(len(S) - i + 1): -            if not set(S[j : j + i]) - acgt: -                ans = max(ans, len(S[j : j + i])) +    count = 0 +    for i in range(len(S)): +        if S[i] in ("A", "C", "G", "T"): +            count += 1 +            ans = max(ans, count) +        else: +            count = 0 -list(itertools.combinations([1, 2, 3, 4], 2))