import java.util.*;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  String s;
  int n;
  int ans;
  
  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      s = sc.next();
      n = s.length();
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 0; i < n; i++) {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    }
  }
  
  boolean checkString(int lo, int hi) {
    for (int i = lo; i < hi; i++) if (!checkChar(i)) return false;
    return true;
  }
  
  boolean checkChar(int i) {
    char[] cs = new char[] { 'A', 'C', 'G', 'T' };
    for (char c: cs) if (s.charAt(i) == c) return true;
    return false;
  }

  void show() {
    System.out.println(ans);
  }
} import java.util.*; util.* java public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  String s;
  int n;
  int ans;
  
  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      s = sc.next();
      n = s.length();
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 0; i < n; i++) {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    }
  }
  
  boolean checkString(int lo, int hi) {
    for (int i = lo; i < hi; i++) if (!checkChar(i)) return false;
    return true;
  }
  
  boolean checkChar(int i) {
    char[] cs = new char[] { 'A', 'C', 'G', 'T' };
    for (char c: cs) if (s.charAt(i) == c) return true;
    return false;
  }

  void show() {
    System.out.println(ans);
  }
} Main String s; s int n; n int ans; ans public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  } main {
    Main main = new Main();
    main.solve();
    main.show();
  } Main main = new Main(); main new Main() main.solve() main.solve main main.show() main.show main String[] args args public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      s = sc.next();
      n = s.length();
    } finally {
      sc.close();
    }
  } Main {
    Scanner sc = new Scanner(System.in);
    try {
      s = sc.next();
      n = s.length();
    } finally {
      sc.close();
    }
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) try {
      s = sc.next();
      n = s.length();
    } finally {
      sc.close();
    } {
      sc.close();
    } sc.close() sc.close sc {
      s = sc.next();
      n = s.length();
    } s = sc.next() s sc.next() sc.next sc n = s.length() n s.length() s.length s void solve() {
    for (int i = 0; i < n; i++) {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    }
  } solve {
    for (int i = 0; i < n; i++) {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    }
  } for (int i = 0; i < n; i++) {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    } {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    } for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      } int j = i; int j = i; j i j <= n j n j++ j++ j {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      } {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      } if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } checkString(i, j) checkString i j {
          int k = j - i;
          if (ans < k) ans = k;
        } int k = j - i; k j - i j i if (ans < k) ans = k; ans < k ans k ans = k ans k boolean checkString(int lo, int hi) {
    for (int i = lo; i < hi; i++) if (!checkChar(i)) return false;
    return true;
  } checkString {
    for (int i = lo; i < hi; i++) if (!checkChar(i)) return false;
    return true;
  } for (int i = lo; i < hi; i++) if (!checkChar(i)) return false; int i = lo; int i = lo; i lo i < hi i hi i++ i++ i if (!checkChar(i)) return false; if (!checkChar(i)) return false; !checkChar(i) checkChar(i) checkChar i return false; false return true; true int lo lo int hi hi boolean checkChar(int i) {
    char[] cs = new char[] { 'A', 'C', 'G', 'T' };
    for (char c: cs) if (s.charAt(i) == c) return true;
    return false;
  } checkChar {
    char[] cs = new char[] { 'A', 'C', 'G', 'T' };
    for (char c: cs) if (s.charAt(i) == c) return true;
    return false;
  } char[] cs = new char[] { 'A', 'C', 'G', 'T' }; cs new char[] { 'A', 'C', 'G', 'T' } for (char c: cs) if (s.charAt(i) == c) return true; char c cs if (s.charAt(i) == c) return true; if (s.charAt(i) == c) return true; s.charAt(i) == c s.charAt(i) s.charAt s i c return true; true return false; false int i i void show() {
    System.out.println(ans);
  } show {
    System.out.println(ans);
  } System.out.println(ans) System.out.println System.out System System.out ans public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  String s;
  int n;
  int ans;
  
  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      s = sc.next();
      n = s.length();
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 0; i < n; i++) {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    }
  }
  
  boolean checkString(int lo, int hi) {
    for (int i = lo; i < hi; i++) if (!checkChar(i)) return false;
    return true;
  }
  
  boolean checkChar(int i) {
    char[] cs = new char[] { 'A', 'C', 'G', 'T' };
    for (char c: cs) if (s.charAt(i) == c) return true;
    return false;
  }

  void show() {
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  String s;
  int n;
  int ans;
  
  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      s = sc.next();
      n = s.length();
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 0; i < n; i++) {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    }
  }
  
  boolean checkString(int lo, int hi) {
    for (int i = lo; i < hi; i++) if (!checkChar(i)) return false;
    return true;
  }
  
  boolean checkChar(int i) {
    char[] cs = new char[] { 'A', 'C', 'G', 'T' };
    for (char c: cs) if (s.charAt(i) == c) return true;
    return false;
  }

  void show() {
    System.out.println(ans);
  }
} Main
import java.util.*;

public class Main {
  public static void main(String[] args) {
    Main main = new Main();
    main.solve();
    main.show();
  }

  String s;
  int n;
  int ans;
  
  public Main() {
    Scanner sc = new Scanner(System.in);
    try {
      s = sc.next();
      n = s.length();
    } finally {
      sc.close();
    }
  }
  
  void solve() {
    for (int i = 0; i < n; i++) {
      for (int j = i; j <= n; j++) {
        if (checkString(i, j)) {
          int k = j - i;
          if (ans < k) ans = k;
        } 
      }
    }
  }
  
  boolean checkString(int lo, int hi) {
    for (int i = lo; i < hi; i++) if (!checkChar(i)) return false;
    return true;
  }
  
  boolean checkChar(int i) {
    char[] cs = new char[] { 'A', 'C', 'G', 'T' };
    for (char c: cs) if (s.charAt(i) == c) return true;
    return false;
  }

  void show() {
    System.out.println(ans);
  }
}
