'use strict'
function Main(input){
  var garbage=/[^ATGC]+/;
  input=input.split(garbage).map(x=>x.length);
  var result=Math.max.apply(null,input);
  console.log(result);
}

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