import java.util.*;
import java.math.*;
import java.io.*;


public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]) {
        String s = sc.next();
        int max = 0;
        for(int i = 0; i < s.length(); i++) {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        }
        System.out.println(max);
    }
} import java.util.*; util.* java import java.math.*; math.* java import java.io.*; io.* java public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]) {
        String s = sc.next();
        int max = 0;
        for(int i = 0; i < s.length(); i++) {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        }
        System.out.println(max);
    }
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main(String args[]) {
        String s = sc.next();
        int max = 0;
        for(int i = 0; i < s.length(); i++) {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        }
        System.out.println(max);
    } main {
        String s = sc.next();
        int max = 0;
        for(int i = 0; i < s.length(); i++) {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        }
        System.out.println(max);
    } String s = sc.next(); s sc.next() sc.next sc int max = 0; max 0 for(int i = 0; i < s.length(); i++) {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        } int i = 0; int i = 0; i 0 i < s.length() i s.length() s.length s i++ i++ i {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        } {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        } for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            } int j = i; int j = i; j i j <= s.length() j s.length() s.length s j++ j++ j {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            } {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            } String sub = s.substring(i,j); sub s.substring(i,j) s.substring s i j boolean ok = true; ok true for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                } int k = 0; int k = 0; k 0 k < sub.length() k sub.length() sub.length sub k++ k++ k {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                } {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                } if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false; sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T' sub.charAt(k) != 'G' sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T' sub.charAt(k) != 'A' sub.charAt(k) sub.charAt sub k 'A' sub.charAt(k) != 'C' sub.charAt(k) sub.charAt sub k 'C' sub.charAt(k) != 'G' sub.charAt(k) sub.charAt sub k 'G' sub.charAt(k) != 'T' sub.charAt(k) sub.charAt sub k 'T' ok = false ok false if(ok) max = Math.max(max, sub.length()); ok max = Math.max(max, sub.length()) max Math.max(max, sub.length()) Math.max Math max sub.length() sub.length sub System.out.println(max) System.out.println System.out System System.out max String args[] args public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]) {
        String s = sc.next();
        int max = 0;
        for(int i = 0; i < s.length(); i++) {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        }
        System.out.println(max);
    }
} public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]) {
        String s = sc.next();
        int max = 0;
        for(int i = 0; i < s.length(); i++) {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        }
        System.out.println(max);
    }
} Main
import java.util.*;
import java.math.*;
import java.io.*;


public class Main {
    static Scanner sc = new Scanner(System.in);
    public static void main(String args[]) {
        String s = sc.next();
        int max = 0;
        for(int i = 0; i < s.length(); i++) {
            for(int j = i; j <= s.length(); j++) {
                String sub = s.substring(i,j);
                boolean ok = true;
                for(int k = 0; k < sub.length(); k++) {
                    if(sub.charAt(k) != 'A' && sub.charAt(k) != 'C' && sub.charAt(k) != 'G' && sub.charAt(k) != 'T') ok = false;
                }
                if(ok) max = Math.max(max, sub.length());
            }
        }
        System.out.println(max);
    }
}