function main(lines) {
 const input = lines.split('')
 for(var i=0; i<input.length; i++){
     
     if(input[i].includes('A')){
     } else if(input[i].includes('T')){
         
     } else if(input[i].includes('C')){
         
     } else if(input[i].includes('G')){
         
     } else {
         input[i] = '\n'
     }
 }

  var lengthArray = input.join('').split('\n').map(function(val){return val.length})
  console.log( Math.max(...lengthArray) )
}

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