import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String line = sc.next();
    Main abc122B = new Main();
    System.out.println(abc122B.solve(line));
  }

  public int solve(String line) {
    int ans = 0;
    int temp = 0;
    Set<Character> set = new HashSet(Arrays.asList('A', 'T', 'C', 'G'));
    for (int i = 0; i < line.length(); i++) {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    }
    return ans;
  }
} import java.util.Arrays; Arrays java.util import java.util.HashSet; HashSet java.util import java.util.Scanner; Scanner java.util import java.util.Set; Set java.util public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String line = sc.next();
    Main abc122B = new Main();
    System.out.println(abc122B.solve(line));
  }

  public int solve(String line) {
    int ans = 0;
    int temp = 0;
    Set<Character> set = new HashSet(Arrays.asList('A', 'T', 'C', 'G'));
    for (int i = 0; i < line.length(); i++) {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    }
    return ans;
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String line = sc.next();
    Main abc122B = new Main();
    System.out.println(abc122B.solve(line));
  } main {
    Scanner sc = new Scanner(System.in);
    String line = sc.next();
    Main abc122B = new Main();
    System.out.println(abc122B.solve(line));
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String line = sc.next(); line sc.next() sc.next sc Main abc122B = new Main(); abc122B new Main() System.out.println(abc122B.solve(line)) System.out.println System.out System System.out abc122B.solve(line) abc122B.solve abc122B line String[] args args public int solve(String line) {
    int ans = 0;
    int temp = 0;
    Set<Character> set = new HashSet(Arrays.asList('A', 'T', 'C', 'G'));
    for (int i = 0; i < line.length(); i++) {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    }
    return ans;
  } solve {
    int ans = 0;
    int temp = 0;
    Set<Character> set = new HashSet(Arrays.asList('A', 'T', 'C', 'G'));
    for (int i = 0; i < line.length(); i++) {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    }
    return ans;
  } int ans = 0; ans 0 int temp = 0; temp 0 Set<Character> set = new HashSet(Arrays.asList('A', 'T', 'C', 'G')); set new HashSet(Arrays.asList('A', 'T', 'C', 'G')) for (int i = 0; i < line.length(); i++) {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    } int i = 0; int i = 0; i 0 i < line.length() i line.length() line.length line i++ i++ i {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    } {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    } if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      } set.contains(line.charAt(i)) set.contains set line.charAt(i) line.charAt line i {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } temp += 1 temp 1 if (temp > ans) {
          ans = temp;
        } temp > ans temp ans {
          ans = temp;
        } ans = temp ans temp {
        temp = 0;
      } temp = 0 temp 0 return ans; ans String line line public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String line = sc.next();
    Main abc122B = new Main();
    System.out.println(abc122B.solve(line));
  }

  public int solve(String line) {
    int ans = 0;
    int temp = 0;
    Set<Character> set = new HashSet(Arrays.asList('A', 'T', 'C', 'G'));
    for (int i = 0; i < line.length(); i++) {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    }
    return ans;
  }
} public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String line = sc.next();
    Main abc122B = new Main();
    System.out.println(abc122B.solve(line));
  }

  public int solve(String line) {
    int ans = 0;
    int temp = 0;
    Set<Character> set = new HashSet(Arrays.asList('A', 'T', 'C', 'G'));
    for (int i = 0; i < line.length(); i++) {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    }
    return ans;
  }
} Main
import java.util.Arrays;
import java.util.HashSet;
import java.util.Scanner;
import java.util.Set;

public class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String line = sc.next();
    Main abc122B = new Main();
    System.out.println(abc122B.solve(line));
  }

  public int solve(String line) {
    int ans = 0;
    int temp = 0;
    Set<Character> set = new HashSet(Arrays.asList('A', 'T', 'C', 'G'));
    for (int i = 0; i < line.length(); i++) {
      if (set.contains(line.charAt(i))) {
        temp += 1;
        if (temp > ans) {
          ans = temp;
        }
      } else {
        temp = 0;
      }
    }
    return ans;
  }
}
