import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    char[] T = sc.next().toCharArray();
    int ans = 0;
    int now = 0;
    char[] atcg = {'A', 'T', 'C', 'G'};
    for(int i = 0; i < T.length; i++){
      boolean isATCG = false;
      for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      }
      if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      }
    }
    System.out.println(ans);
  }
}
        
         import java.util.*; util.* java class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    char[] T = sc.next().toCharArray();
    int ans = 0;
    int now = 0;
    char[] atcg = {'A', 'T', 'C', 'G'};
    for(int i = 0; i < T.length; i++){
      boolean isATCG = false;
      for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      }
      if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    char[] T = sc.next().toCharArray();
    int ans = 0;
    int now = 0;
    char[] atcg = {'A', 'T', 'C', 'G'};
    for(int i = 0; i < T.length; i++){
      boolean isATCG = false;
      for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      }
      if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      }
    }
    System.out.println(ans);
  } main {
    Scanner sc = new Scanner(System.in);
    char[] T = sc.next().toCharArray();
    int ans = 0;
    int now = 0;
    char[] atcg = {'A', 'T', 'C', 'G'};
    for(int i = 0; i < T.length; i++){
      boolean isATCG = false;
      for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      }
      if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      }
    }
    System.out.println(ans);
  } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) char[] T = sc.next().toCharArray(); T sc.next().toCharArray() sc.next().toCharArray sc.next() sc.next sc int ans = 0; ans 0 int now = 0; now 0 char[] atcg = {'A', 'T', 'C', 'G'}; atcg {'A', 'T', 'C', 'G'} 'A' 'T' 'C' 'G' for(int i = 0; i < T.length; i++){
      boolean isATCG = false;
      for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      }
      if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      }
    } int i = 0; int i = 0; i 0 i < T.length i T.length T T.length i++ i++ i {
      boolean isATCG = false;
      for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      }
      if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      }
    } {
      boolean isATCG = false;
      for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      }
      if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      }
    } boolean isATCG = false; isATCG false for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      } int j = 0; int j = 0; j 0 j < atcg.length j atcg.length atcg atcg.length j++ j++ j {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      } {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      } if(T[i] == atcg[j]) {
          isATCG = true;
        } T[i] == atcg[j] T[i] T i atcg[j] atcg j {
          isATCG = true;
        } isATCG = true isATCG true if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      } !isATCG isATCG {
        now = 0;
      } now = 0 now 0 {
        now++;
        ans = Math.max(ans, now);
      } now++ now ans = Math.max(ans, now) ans Math.max(ans, now) Math.max Math ans now System.out.println(ans) System.out.println System.out System System.out ans String[] args args
import java.util.*;
class Main{
  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);
    char[] T = sc.next().toCharArray();
    int ans = 0;
    int now = 0;
    char[] atcg = {'A', 'T', 'C', 'G'};
    for(int i = 0; i < T.length; i++){
      boolean isATCG = false;
      for(int j = 0; j < atcg.length; j++) {
        if(T[i] == atcg[j]) {
          isATCG = true;
        }
      }
      if(!isATCG) {
        now = 0;
      }else {
        now++;
        ans = Math.max(ans, now);
      }
    }
    System.out.println(ans);
  }
}
        
        
