import Data.List
main::IO()
main=print.solver=<<getLine

solver::String->Int
solver =maximum_safe.(map length).(filter head).group.(map (\c->elem c "ACGT"))

maximum_safe::[Int]->Int
maximum_safe [] = 0
maximum_safe s = maximum s