let input() = stdin.ReadLine()
let inputs() = input().Split()

let YN b = printfn "%s" (if b then "Yes" else "No")
let print x = printfn "%A" x
let printS (s: string) = printfn "%s" s

open System.Linq
open System.Text.RegularExpressions


let S = input()

seq {
    for s in Regex.Split(S, "[^ATGC]") do
        yield s.Length
}
|> Array.ofSeq
|> Array.max
|> print
