

def main():

    s = eval(input())

    ans = 0

    seq = 0

    for c in s:

        if c == 'A' or c == 'C' or c == 'T' or c == 'G':

            seq+=1

        else:

            ans = max(ans,seq)

            seq=0

    else:

        ans = max(ans,seq)

    print(ans)



if __name__ == '__main__':

    main()
if __name__ =='__main__':

    s = eval(input())

    ans = 0

    seq = 0

    for c in s:

        if c=='A' or c=='T' or c=='G' or c=='C':

            seq+=1

        else:

            ans = max(ans,seq)

            seq=0

    ans = max(ans,seq)

    print(ans)
def main():
    s = eval(input())
    ans = 0
    seq = 0
    for c in s:
        if c == "A" or c == "C" or c == "T" or c == "G":
            seq += 1
        else:
            ans = max(ans, seq)
            seq = 0
    else:
        ans = max(ans, seq)
    print(ans)


if __name__ == "__main__":
    main()

if __name__ == "__main__":
    s = eval(input())
    ans = 0
    seq = 0
    for c in s:
        if c == "A" or c == "T" or c == "G" or c == "C":
            seq += 1
        else:
            ans = max(ans, seq)
            seq = 0
    ans = max(ans, seq)
    print(ans)

-def main(): +if __name__ == "__main__": -        if c == "A" or c == "C" or c == "T" or c == "G": +        if c == "A" or c == "T" or c == "G" or c == "C": -    else: -        ans = max(ans, seq) +    ans = max(ans, seq) - - -if __name__ == "__main__": -    main()