Option Strict On
Module Module1

    Sub Main()
        Dim S As String = Console.ReadLine()
        Dim mojisu As Integer = Strings.Len(S)
        Dim counter As Integer = 0
        Dim answer As Integer = 0
        For i As Integer = 1 To mojisu
            If Mid(S, i, 1) = "A" Or Mid(S, i, 1) = "C" Or Mid(S, i, 1) = "G" Or Mid(S, i, 1) = "G" Or Mid(S, i, 1) = "T" Then
                counter += 1
                If answer <= counter Then
                    answer = counter
                End If
            Else
                counter = 0
            End If
        Next
        Console.WriteLine(answer)
        Console.ReadLine()
    End Sub

End Module