#include <bits/stdc++.h>
using namespace std;
bool acgt(char c){
	return c=='A'||c=='G'||c=='C'||c=='T';
}
int main() {
	string s; cin >> s; s += ' ';
	int ans = 0, curr = 0; 
	for(int i = 0; i < s.length(); i++){
		if (acgt(s[i])) curr++, ans = max(ans, curr);
		else curr = 0;
	}
	cout << ans;
}