'use strict'

function main(input) {
    let obj = { 'A':true, 'T':true, 'C':true, 'G':true }
    input = input.split('')
    let max = 0;
    let tmp = 0;
    for (let i = 0; i < input.length; i++) {
        let str = input[i]
        if (obj[str]) {
            tmp += 1
            max = Math.max(tmp, max)
        }
        else {
            tmp = 0
        }
    }
    console.log(max)

}
main(require('fs').readFileSync('/dev/stdin', 'utf8'))
