import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int ans = 0;
    
    for(int i = 0; i<s.length()+1; i++) {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    }
    System.out.println(ans);
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io import java.io.IOException; IOException java.io public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int ans = 0;
    
    for(int i = 0; i<s.length()+1; i++) {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    }
    System.out.println(ans);
  }
} Main public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int ans = 0;
    
    for(int i = 0; i<s.length()+1; i++) {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    }
    System.out.println(ans);
  } main {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int ans = 0;
    
    for(int i = 0; i<s.length()+1; i++) {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    }
    System.out.println(ans);
  } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) String s = in.readLine(); s in.readLine() in.readLine in int ans = 0; ans 0 for(int i = 0; i<s.length()+1; i++) {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    } int i = 0; int i = 0; i 0 i<s.length()+1 i s.length()+1 s.length() s.length s 1 i++ i++ i {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    } {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    } for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      } int j = i + 1; int j = i + 1; j i + 1 i 1 j < s.length()+1 j s.length()+1 s.length() s.length s 1 j++ j++ j {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      } {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      } String sub = s.substring(i,j); sub s.substring(i,j) s.substring s i j int tmpLen = 0; tmpLen 0 for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        } int k = 0; int k = 0; k 0 k < sub.length() k sub.length() sub.length sub k++ k++ k {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        } {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        } if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          } sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T' sub.charAt(k) == 'G' sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T' sub.charAt(k) == 'A' sub.charAt(k) sub.charAt sub k 'A' sub.charAt(k) == 'C' sub.charAt(k) sub.charAt sub k 'C' sub.charAt(k) == 'G' sub.charAt(k) sub.charAt sub k 'G' sub.charAt(k) == 'T' sub.charAt(k) sub.charAt sub k 'T' {
            tmpLen++;
          } tmpLen++ tmpLen {
            break;
          } break; ans = Math.max(ans, tmpLen) ans Math.max(ans, tmpLen) Math.max Math ans tmpLen System.out.println(ans) System.out.println System.out System System.out ans String[] args args public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int ans = 0;
    
    for(int i = 0; i<s.length()+1; i++) {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    }
    System.out.println(ans);
  }
} public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int ans = 0;
    
    for(int i = 0; i<s.length()+1; i++) {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    }
    System.out.println(ans);
  }
} Main
import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.IOException;

public class Main {
  public static void main(String[] args) throws IOException {
    BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    String s = in.readLine();
    int ans = 0;
    
    for(int i = 0; i<s.length()+1; i++) {
      for(int j = i + 1; j < s.length()+1; j++) {
        String sub = s.substring(i,j);
        int tmpLen = 0;
        for(int k = 0; k < sub.length(); k++) {
          if(sub.charAt(k) == 'A'||sub.charAt(k) == 'C'||
             sub.charAt(k) == 'G'||sub.charAt(k) == 'T') {
            tmpLen++;
          } else {
            break;
          }
        }
        ans = Math.max(ans, tmpLen);
      }
    }
    System.out.println(ans);
  }
}