import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();

        Set<String> checkSet = new HashSet<>();
        checkSet.add("A");
        checkSet.add("C");
        checkSet.add("G");
        checkSet.add("T");

        int ans = 0;

        for(int i = 0; i < S.length(); i++) {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.PrintWriter; PrintWriter java.io import java.util.HashSet; HashSet java.util import java.util.Set; Set java.util import java.util.StringTokenizer; StringTokenizer java.util public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();

        Set<String> checkSet = new HashSet<>();
        checkSet.add("A");
        checkSet.add("C");
        checkSet.add("G");
        checkSet.add("T");

        int ans = 0;

        for(int i = 0; i < S.length(); i++) {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
} Main public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();

        Set<String> checkSet = new HashSet<>();
        checkSet.add("A");
        checkSet.add("C");
        checkSet.add("G");
        checkSet.add("T");

        int ans = 0;

        for(int i = 0; i < S.length(); i++) {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    } main {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();

        Set<String> checkSet = new HashSet<>();
        checkSet.add("A");
        checkSet.add("C");
        checkSet.add("G");
        checkSet.add("T");

        int ans = 0;

        for(int i = 0; i < S.length(); i++) {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    } BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in)); br new BufferedReader(new java.io.InputStreamReader(System.in)) PrintWriter pw = new PrintWriter(System.out); pw new PrintWriter(System.out) StringTokenizer st = new StringTokenizer(br.readLine()); st new StringTokenizer(br.readLine()) String S = st.nextToken(); S st.nextToken() st.nextToken st Set<String> checkSet = new HashSet<>(); checkSet new HashSet<>() checkSet.add("A") checkSet.add checkSet "A" checkSet.add("C") checkSet.add checkSet "C" checkSet.add("G") checkSet.add checkSet "G" checkSet.add("T") checkSet.add checkSet "T" int ans = 0; ans 0 for(int i = 0; i < S.length(); i++) {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        } int i = 0; int i = 0; i 0 i < S.length() i S.length() S.length S i++ i++ i {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        } {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        } if(!checkSet.contains(S.substring(i, i + 1))) continue; !checkSet.contains(S.substring(i, i + 1)) checkSet.contains(S.substring(i, i + 1)) checkSet.contains checkSet S.substring(i, i + 1) S.substring S i i + 1 i 1 continue; int tmp = 1; tmp 1 for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            } int j = i + 1; int j = i + 1; j i + 1 i 1 j < S.length() j S.length() S.length S j++ j++ j {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            } {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            } String str = S.substring(j, j + 1); str S.substring(j, j + 1) S.substring S j j + 1 j 1 if(!checkSet.contains(str)) break; !checkSet.contains(str) checkSet.contains(str) checkSet.contains checkSet str break; tmp += 1 tmp 1 if(ans < tmp) ans = tmp; ans < tmp ans tmp ans = tmp ans tmp pw.print(ans) pw.print pw ans br.close() br.close br pw.close() pw.close pw String[] args args public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();

        Set<String> checkSet = new HashSet<>();
        checkSet.add("A");
        checkSet.add("C");
        checkSet.add("G");
        checkSet.add("T");

        int ans = 0;

        for(int i = 0; i < S.length(); i++) {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
} public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();

        Set<String> checkSet = new HashSet<>();
        checkSet.add("A");
        checkSet.add("C");
        checkSet.add("G");
        checkSet.add("T");

        int ans = 0;

        for(int i = 0; i < S.length(); i++) {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class Main {
    
    public static void main(String[] args) throws IOException {
        BufferedReader br = new BufferedReader(new java.io.InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringTokenizer st = new StringTokenizer(br.readLine());

        String S = st.nextToken();

        Set<String> checkSet = new HashSet<>();
        checkSet.add("A");
        checkSet.add("C");
        checkSet.add("G");
        checkSet.add("T");

        int ans = 0;

        for(int i = 0; i < S.length(); i++) {

            if(!checkSet.contains(S.substring(i, i + 1))) continue;

            int tmp = 1;

            for(int j = i + 1; j < S.length(); j++) {
                String str = S.substring(j, j + 1);
                if(!checkSet.contains(str)) break;
                tmp += 1;
            }

            if(ans < tmp) ans = tmp;
            
        }

        pw.print(ans);
        br.close();
        pw.close();
    }
}