
'''simple docstring'''

def 	_snake_case						(      A_       :    str   ):
  """simple docstring"""







  a_      :	int      =							[int(A_   ) for i in ip_va_address.split("""."""   ) if i.isdigit()]
  return len(A_   ) == 4 and all(0 <= int(A_   ) <= 254 for octet in octets   )


if __name__ == "__main__":
    __snake_case:  Optional[Any]								=			input().strip()
    __snake_case:  Optional[Any]								=			"valid" if is_ip_va_address_valid(ip) else "invalid"
    print(F"""{ip} is a {valid_or_invalid} IP v4 address.""")




'''simple docstring'''

def 	_snake_case						(      A_       :    list   ):
  """simple docstring"""







  if len(A_   ) <= 1:
    return [tuple(A_   )]

  a_      :	List[Any]      =							[]

  def generate(A_       :    int     ,		A_       :    list   ):
    a_      :	List[Any]      =							[0] * n
    res.append(tuple(A_   )   )

    a_      :	List[str]      =							0
    while i < n:
      if c[i] < i:
        if i % 2 == 0:
          a_      , a_      :	Union[str, Any]      =							arr[i], arr[0]
        else:
          a_      , a_      :	List[str]      =							arr[i], arr[c[i]]
        res.append(tuple(A_   )   )
        c[i] += 1
        a_      :	Optional[Any]      =							0
      else:
        a_      :	Union[str, Any]      =							0
        i += 1

  generate(len(A_   )     ,		A_   )
  return res


if __name__ == "__main__":
    __snake_case:  Dict								=			input("Enter numbers separated by a comma:\n").strip()
    __snake_case:  Optional[Any]								=			[int(item) for item in user_input.split(",")]
    print(heaps(arr))


