# Необходимо написать регулярное выражение, которое проверяет на корректность IP-адреса.

import re
i = 0
while i < 30:
    address = input("Please enter an IP address: ")
    result = re.match(r"^(((([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])|(0x[0-9A-F][0-9A-F])|(0[0-3][0-7][0-7]))(\.)){3}(([01]?[0-9]?[0-9]|2[0-4][0-9]|25[0-5])|(0x[0-9A-F][0-9A-F])|(0[0-3][0-7][0-7]))$)|(^0x[0-9A-F]{8}$)|(^3[0-7]{10}$)|(^[2-3][0-9]{8,9}$)|(^4[0-2][0-9]{3}[0-6][0-7][0-4][0-9][0-5]$)", address)
    if result:
        print("match")
    else:
        print("no match")
    i += 1


# /^(((((2[0-4][0-9]|25[0-5]|[01]?[0-9]?[0-9])|(0x[A-F0-9]{2})|(0[0-3][0-7]{2}))(\.|$)){4})
# |((0x[0-9A-F]{8})|(0[0-3][0-7]{9,10})|([1-3][0-9]{1,9}?)|(4[0-9]{8})|
# (4[0-2][0-9][0-9][0-9][0-6][0-7][0-4][0-9][0-5])))$/