'use strict';
console.log(function(args){
  const S = args.trim();
  let count = 0, max = 0;
  for ( let i = S.length; i >= 0; i-- ) {
    switch( S[i] ) {
      case 'A':
      case 'C':
      case 'G':
      case 'T':
        max = Math.max(++count);
        break;
      default:
        count = 0;
    }
  }
  return max.toString();
}(require('fs').readFileSync('/dev/stdin', 'utf8')));
