import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    }
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc int n = s.length(); n s.length() s.length s int ans = 0; ans 0 for (int i = 0; i < n; i++) {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    } {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    } for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      } int j = i + 1; int j = i + 1; j i + 1 i 1 j <= n j n j++ j++ j {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      } {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      } String str = s.substring(i, j); str s.substring(i, j) s.substring s i j int cnt = 0; cnt 0 for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        } int k = 0; int k = 0; k 0 k < str.length() k str.length() str.length str k++ k++ k {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        } {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        } char ch = str.charAt(k); ch str.charAt(k) str.charAt str k if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          } !(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') (ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T') ch == 'G' ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T' ch == 'A' ch 'A' ch == 'C' ch 'C' ch == 'G' ch 'G' ch == 'T' ch 'T' {
            cnt = 0;
            break;
          } cnt = 0 cnt 0 break; cnt++ cnt ans = Math.max(ans, cnt) ans Math.max(ans, cnt) Math.max Math ans cnt System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    }
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    }
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    int n = s.length();
    int ans = 0;
    for (int i = 0; i < n; i++) {
      for (int j = i + 1; j <= n; j++) {
        String str = s.substring(i, j);
        int cnt = 0;
        for (int k = 0; k < str.length(); k++) {
          char ch = str.charAt(k);
          if (!(ch == 'A' || ch == 'C' || ch == 'G' || ch == 'T')) {
            cnt = 0;
            break;
          }
          cnt++;
        }
        ans = Math.max(ans, cnt);
      }
    }
    System.out.println(ans);
  }
}