#include<iostream>
using namespace std;

int main() {
	string S;
	cin >> S;

	int Q = 0;
	int answer = 0;

	for (int i = 0; i < S.size(); i++) {
		if (S[i] == 'A' || S[i] == 'C' || S[i] == 'G' || S[i] == 'T') Q++;
		else Q = 0;
		if (answer < Q) {
			answer = Q;
		}
	}

	cout << answer << endl;
}