"""simple docstring"""


def     __UpperCAmelCase					(			lowercase		):







  """simple docstring"""
  _UpperCAmelCase						 =      [int(SCREAMING_SNAKE_CASE_		) for i in ip_va_address.split("""."""		) if i.isdigit()]
  return len(SCREAMING_SNAKE_CASE_		) == 4 and all(0 <= int(SCREAMING_SNAKE_CASE_		) <= 2_54 for octet in octets		)


if __name__ == "__main__":
    UpperCAmelCase__  		=						input().strip()
    UpperCAmelCase__  		=						"valid" if is_ip_va_address_valid(ip) else "invalid"
    print(F'''{ip} is a {valid_or_invalid} IP v4 address.''')



"""simple docstring"""


from __future__ import annotations

from random import choice






def     __UpperCAmelCase					(			lowercase		):







  """simple docstring"""
  return choice(lowercase		)






def     __UpperCAmelCase					(			lowercase   ,lowercase		):







  """simple docstring"""
  _UpperCAmelCase						 =      random_pivot(lowercase		)

  # partition based on pivot
  # linear time
  _UpperCAmelCase						 =      [e for e in lst if e < pivot]
  _UpperCAmelCase						 =      [e for e in lst if e > pivot]

  # if we get lucky, pivot might be the element we want.
  # we can easily see this:
  # small (elements smaller than k)
  # + pivot (kth element)
  # + big (elements larger than k)
  if len(lowercase		) == k - 1:
    return pivot
  # pivot is in elements bigger than k
  elif len(lowercase		) < k - 1:
    return kth_number(lowercase   ,k - len(lowercase		) - 1		)
  # pivot is in elements smaller than k
  else:
    return kth_number(lowercase   ,lowercase		)


if __name__ == "__main__":
    import doctest

    doctest.testmod()
