import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    char[] c = {'A', 'T', 'G', 'C'};
    String ans = "", tmp = "";
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    }
    if (ans.length() < tmp.length()) {
      System.out.println(tmp.length());
    } else {
      System.out.println(ans.length());
    }
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    char[] c = {'A', 'T', 'G', 'C'};
    String ans = "", tmp = "";
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    }
    if (ans.length() < tmp.length()) {
      System.out.println(tmp.length());
    } else {
      System.out.println(ans.length());
    }
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    char[] c = {'A', 'T', 'G', 'C'};
    String ans = "", tmp = "";
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    }
    if (ans.length() < tmp.length()) {
      System.out.println(tmp.length());
    } else {
      System.out.println(ans.length());
    }
  } main {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    char[] c = {'A', 'T', 'G', 'C'};
    String ans = "", tmp = "";
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    }
    if (ans.length() < tmp.length()) {
      System.out.println(tmp.length());
    } else {
      System.out.println(ans.length());
    }
  } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str = br.readLine(); str br.readLine() br.readLine br char[] c = {'A', 'T', 'G', 'C'}; c {'A', 'T', 'G', 'C'} 'A' 'T' 'G' 'C' String ans = "" ans "" tmp = ""; tmp "" for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    } int i = 0; int i = 0; i 0 i < str.length() i str.length() str.length str i++ i++ i {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    } {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    } switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      } str.charAt(i) str.charAt str i case 'A' : 'A' case 'A' : case 'T' : 'T' case 'T' : case 'C' : 'C' case 'C' : case 'G' : 'G' case 'G' : tmp += String.valueOf(str.charAt(i)) tmp String.valueOf(str.charAt(i)) String.valueOf String str.charAt(i) str.charAt str i break; default : default : if (ans.length() < tmp.length()) {
            ans = tmp;
          } ans.length() < tmp.length() ans.length() ans.length ans tmp.length() tmp.length tmp {
            ans = tmp;
          } ans = tmp ans tmp tmp = "" tmp "" break; if (ans.length() < tmp.length()) {
      System.out.println(tmp.length());
    } else {
      System.out.println(ans.length());
    } ans.length() < tmp.length() ans.length() ans.length ans tmp.length() tmp.length tmp {
      System.out.println(tmp.length());
    } System.out.println(tmp.length()) System.out.println System.out System System.out tmp.length() tmp.length tmp {
      System.out.println(ans.length());
    } System.out.println(ans.length()) System.out.println System.out System System.out ans.length() ans.length ans String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    char[] c = {'A', 'T', 'G', 'C'};
    String ans = "", tmp = "";
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    }
    if (ans.length() < tmp.length()) {
      System.out.println(tmp.length());
    } else {
      System.out.println(ans.length());
    }
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    char[] c = {'A', 'T', 'G', 'C'};
    String ans = "", tmp = "";
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    }
    if (ans.length() < tmp.length()) {
      System.out.println(tmp.length());
    } else {
      System.out.println(ans.length());
    }
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
    String str = br.readLine();
    char[] c = {'A', 'T', 'G', 'C'};
    String ans = "", tmp = "";
    for (int i = 0; i < str.length(); i++) {
      switch (str.charAt(i)) {
        case 'A' :
        case 'T' :
        case 'C' :
        case 'G' :
          tmp += String.valueOf(str.charAt(i));
          break;
        default :
          if (ans.length() < tmp.length()) {
            ans = tmp;
          }
          tmp = "";
          break;
      }
    }
    if (ans.length() < tmp.length()) {
      System.out.println(tmp.length());
    } else {
      System.out.println(ans.length());
    }
  }
}