import re

s=re.split("[^ACGT]", eval(input()))

a=[]

for i in range(len(s)):

    a.append(len(s[i]))

print((max(a)))
s = eval(input())

count = 0

temp = 0

for i in range(len(s)):

  if s[i] in "ACGT":

    temp += 1

  elif temp:

    if count < temp:

      count = temp

    temp = 0

if count < temp:

  count = temp

print(count)
import re

s = re.split("[^ACGT]", eval(input()))
a = []
for i in range(len(s)):
    a.append(len(s[i]))
print((max(a)))

s = eval(input())
count = 0
temp = 0
for i in range(len(s)):
    if s[i] in "ACGT":
        temp += 1
    elif temp:
        if count < temp:
            count = temp
        temp = 0
if count < temp:
    count = temp
print(count)

-import re - -s = re.split("[^ACGT]", eval(input())) -a = [] +s = eval(input()) +count = 0 +temp = 0 -    a.append(len(s[i])) -print((max(a))) +    if s[i] in "ACGT": +        temp += 1 +    elif temp: +        if count < temp: +            count = temp +        temp = 0 +if count < temp: +    count = temp +print(count)