import java.util.*;
import java.io.*;

public class Main
{
  	int cnt, max = 0, at = 0, l;
  	char[] s;
  	String set = "ATGC";
  
    Main(Scanner in, PrintWriter out)
    {
      s = in.next().toCharArray();
      l = s.length;
      while (at < l)
      {
        cnt = 0;
        while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
        at++;
      }
      out.print(max);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} import java.util.*; util.* java import java.io.*; io.* java public class Main
{
  	int cnt, max = 0, at = 0, l;
  	char[] s;
  	String set = "ATGC";
  
    Main(Scanner in, PrintWriter out)
    {
      s = in.next().toCharArray();
      l = s.length;
      while (at < l)
      {
        cnt = 0;
        while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
        at++;
      }
      out.print(max);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} Main int cnt cnt max = 0 max 0 at = 0 at 0 l; l char[] s; s String set = "ATGC"; set "ATGC" Main(Scanner in, PrintWriter out)
    {
      s = in.next().toCharArray();
      l = s.length;
      while (at < l)
      {
        cnt = 0;
        while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
        at++;
      }
      out.print(max);
    } Main {
      s = in.next().toCharArray();
      l = s.length;
      while (at < l)
      {
        cnt = 0;
        while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
        at++;
      }
      out.print(max);
    } s = in.next().toCharArray() s in.next().toCharArray() in.next().toCharArray in.next() in.next in l = s.length l s.length s s.length while (at < l)
      {
        cnt = 0;
        while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
        at++;
      } at < l at l {
        cnt = 0;
        while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
        at++;
      } cnt = 0 cnt 0 while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        } at < l && set.contains(s[at]+"") at < l at l set.contains(s[at]+"") set.contains set s[at]+"" s[at] s at "" {
          at++;
          cnt++;
        } at++ at cnt++ cnt max = Math.max(max, cnt) max Math.max(max, cnt) Math.max Math max cnt at++ at out.print(max) out.print out max Scanner in in PrintWriter out out public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} main {
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) PrintWriter out = new PrintWriter(System.out); out new PrintWriter(System.out) new	Main(in, out) out.close() out.close out String[] args args public class Main
{
  	int cnt, max = 0, at = 0, l;
  	char[] s;
  	String set = "ATGC";
  
    Main(Scanner in, PrintWriter out)
    {
      s = in.next().toCharArray();
      l = s.length;
      while (at < l)
      {
        cnt = 0;
        while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
        at++;
      }
      out.print(max);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} public class Main
{
  	int cnt, max = 0, at = 0, l;
  	char[] s;
  	String set = "ATGC";
  
    Main(Scanner in, PrintWriter out)
    {
      s = in.next().toCharArray();
      l = s.length;
      while (at < l)
      {
        cnt = 0;
        while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
        at++;
      }
      out.print(max);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
} Main
import java.util.*;
import java.io.*;

public class Main
{
  	int cnt, max = 0, at = 0, l;
  	char[] s;
  	String set = "ATGC";
  
    Main(Scanner in, PrintWriter out)
    {
      s = in.next().toCharArray();
      l = s.length;
      while (at < l)
      {
        cnt = 0;
        while (at < l && set.contains(s[at]+""))
        {
          at++;
          cnt++;
        }
        max = Math.max(max, cnt);
        at++;
      }
      out.print(max);
    }
	
	public static void main(String[] args)
	{
		Scanner in = new Scanner(System.in);
		PrintWriter out = new PrintWriter(System.out);
		new	Main(in, out);
		out.close();
	} 
}
