const main = (s) => {
const val = s.split("")
const base ='ATCG'
var count = 0
var hit = 0
val.forEach((ele,index) =>{
    if(base.includes(ele)){
    	count++
        if(val.length >= index){
          hit = count > hit?count:hit
        }
    }else{
      	hit = count > hit?count:hit
    	count = 0
    }
})
console.log(hit)
}

main(require('fs').readFileSync('/dev/stdin', 'utf8').trim())