let readString() = stdin.ReadLine()
let readStringArray() = stdin.ReadLine().Split(' ');
let readInt() = readString() |> int
let readIntArray() = readStringArray() |> Array.map(fun x -> int x)
let char2String(value) = List.ofSeq value |> List.toArray |> System.String

let s = List.ofArray(readString().ToCharArray())

let rec solve str acc result =
    match str with 
    | h :: t ->     
        if List.contains h ['A'; 'C'; 'G'; 'T'] then 
            solve t (acc + 1) (max (acc + 1) result)
        else 
            solve t 0 result
    | _ -> result

solve s 0 0
|> printfn "%d"