const find = (val) =>{
const base ='ATCG'
var count = 0
var hit = []
val.forEach((ele,index) =>{
    if(base.includes(ele)){
    	count++
        if(val.length >= index){
        	hit.push(count)
        }
    }else{
      	hit.push(count)
    	count = 0
    }
})
return hit.sort((a,b)=>{return b-a})[0]
}

const main = (s) => {
if(s){
const val = s.split("")
console.log(find(val))
}else{
console.log(0)
}
}

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