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', () => {
  const S = lines[0];
  const M = S.match(/[ATGC]+/g);
  var ans = M ? M.map(s=>s.length).reduce((x,y)=>Math.max(x,y)) : 0;
  console.log(ans);
});