#include<bits/stdc++.h>
using namespace std;
int main(){
  string s;
  cin >> s;
  int i,j;
  int ans = 0;
  for(i=0;i<s.length();i++){
    j=0;
    while((s[i+j]=='A' || s[i+j]=='T' || s[i+j]=='G'||s[i+j]=='C')&&i+j<s.length()){
      j++;
    }
    if(j>ans)ans=j;
  }
  cout<<ans<<endl;
}
