Module _20190422

    Sub Main()

        Dim sStr() As Char = Console.ReadLine().ToCharArray

        Dim iMaxLength As Integer = 0
        Dim iCurrentLength As Integer = 0

        For i As Integer = 0 To sStr.Length - 1

            iCurrentLength = 0

            For j As Integer = i To sStr.Length - 1

                If sStr(j) = "A" OrElse sStr(j) = "C" OrElse sStr(j) = "G" OrElse sStr(j) = "T" Then

                    iCurrentLength = iCurrentLength + 1

                Else

                    Exit For

                End If

            Next

            If iMaxLength < iCurrentLength Then

                iMaxLength = iCurrentLength

            End If

        Next

        Console.WriteLine(iMaxLength)

    End Sub

End Module