process.stdin.resume();
process.stdin.setEncoding('utf8');

var lines = []
var reader = require('readline').createInterface({
  input: process.stdin,
  output: process.stdout
});

reader.on('line', (line) => {
  lines.push(line);
});

reader.on('close', () => {
 var str = lines[0];
 str = str.replace(/[^ACGT]+/g, '-');
 var max = [];
 var a = str.split('-');
 for(i=0; i<a.length; i++){
   max.push(a[i].length);
 }
  console.log(Math.max(...max));
});