import java.io.IOException;
public class Main {
	public static void main(String[] args) throws IOException {
		char moji[]=new char[11];
		int count[]=new int[11];
		for(int i=0;i<10;i++) {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		}
		for(int i=0,j=0;i<moji.length;i++,j++) {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		}
		int max=0;
		for(int i=0;i<count.length;i++) {
			if(max<count[i]) {
				max=count[i];
			}
		}
		System.out.println(max);
	}
} import java.io.IOException; IOException java.io public class Main {
	public static void main(String[] args) throws IOException {
		char moji[]=new char[11];
		int count[]=new int[11];
		for(int i=0;i<10;i++) {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		}
		for(int i=0,j=0;i<moji.length;i++,j++) {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		}
		int max=0;
		for(int i=0;i<count.length;i++) {
			if(max<count[i]) {
				max=count[i];
			}
		}
		System.out.println(max);
	}
} Main public static void main(String[] args) throws IOException {
		char moji[]=new char[11];
		int count[]=new int[11];
		for(int i=0;i<10;i++) {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		}
		for(int i=0,j=0;i<moji.length;i++,j++) {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		}
		int max=0;
		for(int i=0;i<count.length;i++) {
			if(max<count[i]) {
				max=count[i];
			}
		}
		System.out.println(max);
	} main {
		char moji[]=new char[11];
		int count[]=new int[11];
		for(int i=0;i<10;i++) {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		}
		for(int i=0,j=0;i<moji.length;i++,j++) {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		}
		int max=0;
		for(int i=0;i<count.length;i++) {
			if(max<count[i]) {
				max=count[i];
			}
		}
		System.out.println(max);
	} char moji[]=new char[11]; moji new char[11] 11 int count[]=new int[11]; count new int[11] 11 for(int i=0;i<10;i++) {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		} int i=0; int i=0; i 0 i<10 i 10 i++ i++ i {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		} {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		} moji[i]=(char)System.in.read() moji[i] moji i (char)System.in.read() System.in.read System.in System System.in if(moji[i]=='\n') {
				break;
			} moji[i]=='\n' moji[i] moji i '\n' {
				break;
			} break; for(int i=0,j=0;i<moji.length;i++,j++) {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		} int i=0,j=0; int i=0 i 0 j=0; j 0 i<moji.length i moji.length moji moji.length i++,j++ i++ i j++ j {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		} {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		} while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			} moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T' moji[i]=='G' moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T' moji[i]=='A' moji[i] moji i 'A' moji[i]=='C' moji[i] moji i 'C' moji[i]=='G' moji[i] moji i 'G' moji[i]=='T' moji[i] moji i 'T' {
				count[j]++;
					i++;
			} count[j]++ count[j] count j i++ i int max=0; max 0 for(int i=0;i<count.length;i++) {
			if(max<count[i]) {
				max=count[i];
			}
		} int i=0; int i=0; i 0 i<count.length i count.length count count.length i++ i++ i {
			if(max<count[i]) {
				max=count[i];
			}
		} {
			if(max<count[i]) {
				max=count[i];
			}
		} if(max<count[i]) {
				max=count[i];
			} max<count[i] max count[i] count i {
				max=count[i];
			} max=count[i] max count[i] count i System.out.println(max) System.out.println System.out System System.out max String[] args args public class Main {
	public static void main(String[] args) throws IOException {
		char moji[]=new char[11];
		int count[]=new int[11];
		for(int i=0;i<10;i++) {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		}
		for(int i=0,j=0;i<moji.length;i++,j++) {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		}
		int max=0;
		for(int i=0;i<count.length;i++) {
			if(max<count[i]) {
				max=count[i];
			}
		}
		System.out.println(max);
	}
} public class Main {
	public static void main(String[] args) throws IOException {
		char moji[]=new char[11];
		int count[]=new int[11];
		for(int i=0;i<10;i++) {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		}
		for(int i=0,j=0;i<moji.length;i++,j++) {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		}
		int max=0;
		for(int i=0;i<count.length;i++) {
			if(max<count[i]) {
				max=count[i];
			}
		}
		System.out.println(max);
	}
} Main
import java.io.IOException;
public class Main {
	public static void main(String[] args) throws IOException {
		char moji[]=new char[11];
		int count[]=new int[11];
		for(int i=0;i<10;i++) {
			moji[i]=(char)System.in.read();
			if(moji[i]=='\n') {
				break;
			}
		}
		for(int i=0,j=0;i<moji.length;i++,j++) {

			while(moji[i]=='A'||moji[i]=='C'||moji[i]=='G'||moji[i]=='T') {
				count[j]++;
					i++;
			}
		}
		int max=0;
		for(int i=0;i<count.length;i++) {
			if(max<count[i]) {
				max=count[i];
			}
		}
		System.out.println(max);
	}
}