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