object Main extends App {
	val s = scala.io.StdIn.readLine.toList.toArray

	var ans = 0
	val L1 = Array('A', 'C', 'G', 'T')

	for(i<-0 until s.size){
		var j = i
		var tp = 0
		while(j < s.size){
			if(L1.contains(s(j))){
				j = j + 1
				tp = tp + 1
			}else{
				j = 100
			}
		}

		ans = math.max(ans, tp)
	}

	println(ans)


}