main = do
  s <- getLine
  let a = [drop y (take x s) | x <- [0..(length s)], y <- [0..(length s)], x>=y]
  print a
  print $ maximum $ map f a
f xs
  | all (\x -> x `elem` ['A','C','G','T']) xs = length xs
  | otherwise = 0
