const input = require('fs').readFileSync('/dev/stdin', 'UTF-8')
var match = input.match(/(A|C|G|T)+/)

if (match) {
  max = ''
  match.forEach(m => {
    if (m.length > max.length) max = m
  })
  console.log(max.length)
} else {
  console.log(0)
}
