let s = read_line ()
let rec f i m c = String.(if i >= length s then m else if contains "ACGT" s.[i] then f (i + 1) (max m @@ c + 1) (c + 1) else f (i + 1) m 0)
let _ = f 0 0 0 |> Printf.printf "%d\n"