import java.util.*;
 
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int length = 0;
    int res = 0;
    for (int i = 0; i < S.length(); i++){
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    }
    if (res < length) {
        res = length;
    }
    System.out.println(res);
  }
  
} 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 length = 0;
    int res = 0;
    for (int i = 0; i < S.length(); i++){
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    }
    if (res < length) {
        res = length;
    }
    System.out.println(res);
  }
  
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int length = 0;
    int res = 0;
    for (int i = 0; i < S.length(); i++){
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    }
    if (res < length) {
        res = length;
    }
    System.out.println(res);
  } main {
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int length = 0;
    int res = 0;
    for (int i = 0; i < S.length(); i++){
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    }
    if (res < length) {
        res = length;
    }
    System.out.println(res);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) String S = sc.next(); S sc.next() sc.next sc int length = 0; length 0 int res = 0; res 0 for (int i = 0; i < S.length(); i++){
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    } {
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    } String s = S.substring(i, i + 1); s S.substring(i, i + 1) S.substring S i i + 1 i 1 if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        } s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C") s.equals("T") s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C") s.equals("A") s.equals s "A" s.equals("G") s.equals s "G" s.equals("T") s.equals s "T" s.equals("C") s.equals s "C" {
            length++;
        } length++ length {
            if (res < length) {
                res = length;
            }
            length = 0;
        } if (res < length) {
                res = length;
            } res < length res length {
                res = length;
            } res = length res length length = 0 length 0 if (res < length) {
        res = length;
    } res < length res length {
        res = length;
    } res = length res length System.out.println(res) System.out.println System.out System System.out res String[] args args public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int length = 0;
    int res = 0;
    for (int i = 0; i < S.length(); i++){
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    }
    if (res < length) {
        res = length;
    }
    System.out.println(res);
  }
  
} public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int length = 0;
    int res = 0;
    for (int i = 0; i < S.length(); i++){
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    }
    if (res < length) {
        res = length;
    }
    System.out.println(res);
  }
  
} Main
import java.util.*;
 
public class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    String S = sc.next();
    int length = 0;
    int res = 0;
    for (int i = 0; i < S.length(); i++){
        String s = S.substring(i, i + 1);
        if (s.equals("A") || s.equals("G") || s.equals("T") || s.equals("C")){
            length++;
        } else {
            if (res < length) {
                res = length;
            }
            length = 0;
        }
    }
    if (res < length) {
        res = length;
    }
    System.out.println(res);
  }
  
}
