import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();

    List<Character> lst = Arrays.asList('A', 'C', 'G', 'T');
    int max = 0;
    int seq = 0;
    for (int i = 0; i < s.length(); i++) {
      if (lst.contains(s.charAt(i))) {
        ++seq;
      } else {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      }
    }
    if (seq > max) {
      max = seq;
    }

    System.out.println(max);
  }
} import java.util.Arrays; Arrays java.util import java.util.List; List java.util import java.util.Scanner; Scanner java.util class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();

    List<Character> lst = Arrays.asList('A', 'C', 'G', 'T');
    int max = 0;
    int seq = 0;
    for (int i = 0; i < s.length(); i++) {
      if (lst.contains(s.charAt(i))) {
        ++seq;
      } else {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      }
    }
    if (seq > max) {
      max = seq;
    }

    System.out.println(max);
  }
} Main public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();

    List<Character> lst = Arrays.asList('A', 'C', 'G', 'T');
    int max = 0;
    int seq = 0;
    for (int i = 0; i < s.length(); i++) {
      if (lst.contains(s.charAt(i))) {
        ++seq;
      } else {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      }
    }
    if (seq > max) {
      max = seq;
    }

    System.out.println(max);
  } main {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();

    List<Character> lst = Arrays.asList('A', 'C', 'G', 'T');
    int max = 0;
    int seq = 0;
    for (int i = 0; i < s.length(); i++) {
      if (lst.contains(s.charAt(i))) {
        ++seq;
      } else {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      }
    }
    if (seq > max) {
      max = seq;
    }

    System.out.println(max);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String s = sc.next(); s sc.next() sc.next sc sc.close() sc.close sc List<Character> lst = Arrays.asList('A', 'C', 'G', 'T'); lst Arrays.asList('A', 'C', 'G', 'T') Arrays.asList Arrays 'A' 'C' 'G' 'T' int max = 0; max 0 int seq = 0; seq 0 for (int i = 0; i < s.length(); i++) {
      if (lst.contains(s.charAt(i))) {
        ++seq;
      } else {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      }
    } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
      if (lst.contains(s.charAt(i))) {
        ++seq;
      } else {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      }
    } {
      if (lst.contains(s.charAt(i))) {
        ++seq;
      } else {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      }
    } if (lst.contains(s.charAt(i))) {
        ++seq;
      } else {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      } lst.contains(s.charAt(i)) lst.contains lst s.charAt(i) s.charAt s i {
        ++seq;
      } ++seq seq {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      } if (seq > max) {
          max = seq;
        } seq > max seq max {
          max = seq;
        } max = seq max seq seq = 0 seq 0 if (seq > max) {
      max = seq;
    } seq > max seq max {
      max = seq;
    } max = seq max seq System.out.println(max) System.out.println System.out System System.out max String[] args args
import java.util.Arrays;
import java.util.List;
import java.util.Scanner;

class Main {
  public static void main(String[] args) {
    Scanner sc = new Scanner(System.in);
    String s = sc.next();
    sc.close();

    List<Character> lst = Arrays.asList('A', 'C', 'G', 'T');
    int max = 0;
    int seq = 0;
    for (int i = 0; i < s.length(); i++) {
      if (lst.contains(s.charAt(i))) {
        ++seq;
      } else {
        if (seq > max) {
          max = seq;
        }
        seq = 0;
      }
    }
    if (seq > max) {
      max = seq;
    }

    System.out.println(max);
  }
}
