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