import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        int n = s.length();
        int out = 0;
        for(int i = 0; i < n; i++){
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
} import java.util.*; util.* java public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        int n = s.length();
        int out = 0;
        for(int i = 0; i < n; i++){
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
} Main void solve(){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        int n = s.length();
        int out = 0;
        for(int i = 0; i < n; i++){
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        }
        System.out.println(out);
    } solve {
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        int n = s.length();
        int out = 0;
        for(int i = 0; i < n; i++){
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        }
        System.out.println(out);
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) String s = scan.next(); s scan.next() scan.next scan int n = s.length(); n s.length() s.length s int out = 0; out 0 for(int i = 0; i < n; i++){
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        } int i = 0; int i = 0; i 0 i < n i n i++ i++ i {
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        } {
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        } System.out.println(out) System.out.println System.out System System.out out public static void main(String[] args){
        new Main().solve();
    } main {
        new Main().solve();
    } new Main().solve() new Main().solve new Main() String[] args args public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        int n = s.length();
        int out = 0;
        for(int i = 0; i < n; i++){
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
} public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        int n = s.length();
        int out = 0;
        for(int i = 0; i < n; i++){
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
} Main
import java.util.*;

public class Main{
    void solve(){
        Scanner scan = new Scanner(System.in);
        String s = scan.next();
        int n = s.length();
        int out = 0;
        for(int i = 0; i < n; i++){
            a:for(int j = i; j <= n; j++){
                String t = s.substring(i, j);
                for(int k = 0; k < t.length(); k++){
                    if(t.charAt(k) != 'A' && t.charAt(k) != 'C' && t.charAt(k) != 'G' && t.charAt(k) != 'T') continue a;
                }
                out = Math.max(out, t.length());
            }
        }
        System.out.println(out);
    }


    public static void main(String[] args){
        new Main().solve();
    }
}
