import Foundation

extension String {
    func split(separator: String) -> [Int] {
        return self.componentsSeparatedByString(separator).map { Int($0)! }
    }
}

let S = readLine()!

var ans: [Int] = [0]
var i = 0
for c in S.characters {
    if c == "A" || c == "C" || c == "G" || c == "T" {
        ans[i] += 1
    } else {
        ans.append(0)
        i += 1
    }
}


print(ans.maxElement()!)