import math

import itertools

import numpy as np



def solve():

    s = eval(input())

    le = len(s)

    ans = 0

    for i in range(le):

        for j in range(i, le):

            if all("AGCT".count(k) == 1 for k in s[i:j+1]):

                ans = max(ans, j-i+1)

    print(ans)

    return 0



if __name__ == "__main__":

    solve()

import math

import collections

import fractions

import itertools

import functools

import operator



def solve():

    s = eval(input())

    size = len(s)

    ans = 0

    for beg in range(size):

        for end in range(beg+1, size+1):

            if all('ACGT'.count(c) == 1 for c in s[beg:end]):

                ans = max(ans, end-beg)

    print(ans)

    return 0



if __name__ == "__main__":

    solve()

import math
import itertools
import numpy as np


def solve():
    s = eval(input())
    le = len(s)
    ans = 0
    for i in range(le):
        for j in range(i, le):
            if all("AGCT".count(k) == 1 for k in s[i : j + 1]):
                ans = max(ans, j - i + 1)
    print(ans)
    return 0


if __name__ == "__main__":
    solve()

import math
import collections
import fractions
import itertools
import functools
import operator


def solve():
    s = eval(input())
    size = len(s)
    ans = 0
    for beg in range(size):
        for end in range(beg + 1, size + 1):
            if all("ACGT".count(c) == 1 for c in s[beg:end]):
                ans = max(ans, end - beg)
    print(ans)
    return 0


if __name__ == "__main__":
    solve()

+import collections +import fractions -import numpy as np +import functools +import operator -    le = len(s) +    size = len(s) -    for i in range(le): -        for j in range(i, le): -            if all("AGCT".count(k) == 1 for k in s[i : j + 1]): -                ans = max(ans, j - i + 1) +    for beg in range(size): +        for end in range(beg + 1, size + 1): +            if all("ACGT".count(c) == 1 for c in s[beg:end]): +                ans = max(ans, end - beg)