
'''simple docstring'''





from __future__ import annotations







def snake_case_    (				lowercase__		):
  if not list_of_ints:
    return []

  if min(lowercase__		) < 0:
    raise ValueError("All numbers must be positive"		)

  UpperCAmelCase__			:				List[str]												=       max(len(bin(lowercase__		)[2:]		) for x in list_of_ints		)
  return _msd_radix_sort(lowercase__      ,					lowercase__		)







def snake_case_    (				lowercase__      ,					lowercase__		):
  if bit_position == 0 or len(lowercase__		) in [0, 1]:
    return list_of_ints

  UpperCAmelCase__			:				Optional[int]												=       []
  UpperCAmelCase__			:				Dict												=       []
  # Split numbers based on bit at bit_position from the right
  for number in list_of_ints:
    if (number >> (bit_position - 1)) & 1:
      # number has a one at bit bit_position
      ones.append(lowercase__		)
    else:
      # number has a zero at bit bit_position
      zeros.append(lowercase__		)

    # recursively split both lists further
  UpperCAmelCase__			:				List[Any]												=       _msd_radix_sort(lowercase__      ,					bit_position - 1		)
  UpperCAmelCase__			:				Any												=       _msd_radix_sort(lowercase__      ,					bit_position - 1		)

  # recombine lists
  UpperCAmelCase__			:				List[str]												=       zeros
  res.extend(lowercase__		)

  return res







def snake_case_    (				lowercase__		):
  UpperCAmelCase__			:				List[str]												=       len(lowercase__		)
  if not list_of_ints or length == 1:
    return

  if min(lowercase__		) < 0:
    raise ValueError("All numbers must be positive"		)

  UpperCAmelCase__			:				List[str]												=       max(len(bin(lowercase__		)[2:]		) for x in list_of_ints		)
  _msd_radix_sort_inplace(lowercase__      ,					lowercase__      ,					0      ,					lowercase__		)







def snake_case_    (				lowercase__      ,					lowercase__      ,					lowercase__      ,					lowercase__		):
  if bit_position == 0 or end_index - begin_index <= 1:
    return

  bit_position -= 1

  UpperCAmelCase__			:				List[str]												=       begin_index
  UpperCAmelCase__			:				List[str]												=       end_index - 1
  while i <= j:
    UpperCAmelCase__			:				Union[str, Any]												=       False
    if not (list_of_ints[i] >> bit_position) & 1:
      # found zero at the beginning
      i += 1
      UpperCAmelCase__			:				List[str]												=       True
    if (list_of_ints[j] >> bit_position) & 1:
      # found one at the end
      j -= 1
      UpperCAmelCase__			:				Any												=       True

    if changed:
      continue

    UpperCAmelCase__					, UpperCAmelCase__			:				Dict												=       list_of_ints[j], list_of_ints[i]
    j -= 1
    if j != i:
      i += 1

  _msd_radix_sort_inplace(lowercase__      ,					lowercase__      ,					lowercase__      ,					lowercase__		)
  _msd_radix_sort_inplace(lowercase__      ,					lowercase__      ,					lowercase__      ,					lowercase__		)


if __name__ == "__main__":
      import doctest

      doctest.testmod()





'''simple docstring'''





def snake_case_    (				lowercase__      ,					lowercase__ = 1_3		):
  UpperCAmelCase__			:				Optional[Any]												=       ""
  for c in s:
    if "A" <= c <= "Z":
      out += chr(ord("A"		) + (ord(lowercase__		) - ord("A"		) + n) % 2_6		)
    elif "a" <= c <= "z":
      out += chr(ord("a"		) + (ord(lowercase__		) - ord("a"		) + n) % 2_6		)
    else:
      out += c
  return out







def snake_case_    (				):
  UpperCAmelCase__			:				Dict												=       input("Enter message: "		)

  UpperCAmelCase__			:				Optional[int]												=       dencrypt(lowercase__      ,					1_3		)
  print("Encryption:"      ,					lowercase__		)

  UpperCAmelCase__			:				Union[str, Any]												=       dencrypt(lowercase__      ,					1_3		)
  print("Decryption: "      ,					lowercase__		)


if __name__ == "__main__":
      import doctest

      doctest.testmod()
      main()



