CHARACTER(10) H
INTEGER ANS,CNT
READ*,H
CNT=0
ANS=0
DO I=1,10
 IF(H(I:I)=="A".OR.H(I:I)=="G".OR.H(I:I)=="C".OR.H(I:I)=="T")THEN
  CNT=CNT+1
 ELSE
  CNT=0
 ENDIF
 ANS=MAX(ANS,CNT)
END DO
PRINT"(I0)",ANS
END