output_description: Print the length of the longest _ACGT string_ that is a substring of S.
  
  * * *
input_description: Input is given from Standard Input in the following format:
  
      
      
      S
attempt: #
  # abc122 b
  #
  import sys
  from io import StringIO
  import unittest
  
  
  class TestClass(unittest.TestCase):
      def assertIO(self, input, output):
          stdout, stdin = sys.stdout, sys.stdin
          sys.stdout, sys.stdin = StringIO(), StringIO(input)
          resolve()
          sys.stdout.seek(0)
          out = sys.stdout.read()[:-1]
          sys.stdout, sys.stdin = stdout, stdin
          self.assertEqual(out, output)
  
      def test_入力例_1(self):
          input = """ATCODER"""
          output = """3"""
          self.assertIO(input, output)
  
      def test_入力例_2(self):
          input = """HATAGAYA"""
          output = """5"""
          self.assertIO(input, output)
  
      def test_入力例_3(self):
          input = """SHINJUKU"""
          output = """0"""
          self.assertIO(input, output)
  
  
  def resolve():
      S = input()
  
      ans = 0
      #    for i in range(len(S)):
      #        t = 0
      #        if S[i] == "A" or S[i] == "C" or S[i] == "G" or S[i] == "T":
      #            t += 1
      #            for j in range(i+1, len(S)):
      #                if S[j] == "A" or S[j] == "C" or S[j] == "G" or S[j] == "T":
      #                    t += 1
      #                else:
      #                    break
      #        ans = max(ans, t)
  
      ans = 0
      for i in range(len(S)):
          for j in range(i + 1, len(S)):
              if S[i:j].count("A") + S[i:j].count("C") + S[i:j].count("G") + S[i:j].count(
                  "T"
              ) == len(S[i:j]):
                  ans = max(ans, len(S[i:j]))
      print(ans)
  
  
  if __name__ == "__main__":
      # unittest.main()
      resolve()
  
problem_description: Statement
  
  You are given a string S consisting of uppercase English letters. Find the
  length of the longest _ACGT string_ that is a substring (see Notes) of S.
  
  Here, a ACGT string is a string that contains no characters other than `A`,
  `C`, `G` and `T`.
samples: [{"input": "ATCODER", "output": "3\n    \n\nAmong the ACGT strings that are substrings of `ATCODER`, the longest one is\n`ATC`.\n\n* * *"}, {"input": "HATAGAYA", "output": "5\n    \n\nAmong the ACGT strings that are substrings of `HATAGAYA`, the longest one is\n`ATAGA`.\n\n* * *"}, {"input": "SHINJUKU", "output": "0\n    \n\nAmong the ACGT strings that are substrings of `SHINJUKU`, the longest one is\n`` (the empty string)."}]