read S
ans=0
for l in $(seq 1 ${#S}); do
    for i in $(seq $l ${#S}); do
        c=$(echo $S|cut -c $i)
        if [ "$c" = A ] || [ "$c" = T ] || [ "$c" = G ] || [ "$c" = C ]; then
            len=$((i-l+1))
            if [ $len -gt $ans ]; then
                ans=$len
            fi
        else
            break
        fi 
    done
done

echo $ans