





def  __magic_name__  (				lowercase				,       lowercase				)				-> str:

							"""simple docstring"""



							lowercase_	:   str  				=     """"""
							for i in table:
														res += inp[i - 1]
							return res





def  __magic_name__  (				lowercase				)				-> Optional[int]:

							"""simple docstring"""



							return data[1:] + data[0]





def  __magic_name__  (				lowercase				,       lowercase				)				-> Tuple:

							"""simple docstring"""



							lowercase_	:   List[str]  				=     """"""
							for i in range(len(__a				)				):
														if a[i] == b[i]:
																					res += "0"
														else:
																					res += "1"
							return res





def  __magic_name__  (				lowercase				,       lowercase				)				-> Union[str, Any]:

							"""simple docstring"""



							lowercase_	:   List[Any]  				=     int("""0b""" + data[0] + data[-1]				,       2				)
							lowercase_	:   Any  				=     int("""0b""" + data[1:3]				,       2				)
							return bin(s[row][col]				)[2:]





def  __magic_name__  (				lowercase				,       lowercase				,       lowercase				,       lowercase				,       lowercase				)				-> List[str]:

							"""simple docstring"""



							lowercase_	:   List[Any]  				=     message[:4]
							lowercase_	:   List[Any]  				=     message[4:]
							lowercase_	:   Optional[Any]  				=     apply_table(__a				,       __a				)
							lowercase_	:   str  				=     xor(__a				,       __a				)
							lowercase_	:   List[Any]  				=     apply_sbox(__a				,       temp[:4]				)  # noqa: E741
							lowercase_	:   Tuple  				=     apply_sbox(__a				,       temp[4:]				)
							lowercase_	:   Tuple  				=     """0""" * (2 - len(__a				)) + l  # noqa: E741
							lowercase_	:   Tuple  				=     """0""" * (2 - len(__a				)) + r
							lowercase_	:   Union[str, Any]  				=     apply_table(l + r				,       __a				)
							lowercase_	:   Optional[int]  				=     xor(__a				,       __a				)
							return temp + right


if __name__ == "__main__":
							UpperCAmelCase_							=				input("""Enter 10 bit key: """)
							UpperCAmelCase_							=				input("""Enter 8 bit message: """)

							UpperCAmelCase_							=				[6, 3, 7, 4, 8, 5, 10, 9]
							UpperCAmelCase_							=				[3, 5, 2, 7, 4, 10, 1, 9, 8, 6]
							UpperCAmelCase_							=				[2, 4, 3, 1]
							UpperCAmelCase_							=				[2, 6, 3, 1, 4, 8, 5, 7]
							UpperCAmelCase_							=				[4, 1, 3, 5, 7, 2, 8, 6]
							UpperCAmelCase_							=				[4, 1, 2, 3, 2, 3, 4, 1]
							UpperCAmelCase_							=				[[1, 0, 3, 2], [3, 2, 1, 0], [0, 2, 1, 3], [3, 1, 3, 2]]
							UpperCAmelCase_							=				[[0, 1, 2, 3], [2, 0, 1, 3], [3, 0, 1, 0], [2, 1, 0, 3]]

							# key generation
							UpperCAmelCase_							=				apply_table(key, paa_table)
							UpperCAmelCase_							=				temp[:5]
							UpperCAmelCase_							=				temp[5:]
							UpperCAmelCase_							=				left_shift(left)
							UpperCAmelCase_							=				left_shift(right)
							UpperCAmelCase_							=				apply_table(left + right, pa_table)
							UpperCAmelCase_							=				left_shift(left)
							UpperCAmelCase_							=				left_shift(right)
							UpperCAmelCase_							=				left_shift(left)
							UpperCAmelCase_							=				left_shift(right)
							UpperCAmelCase_							=				apply_table(left + right, pa_table)

							# encryption
							UpperCAmelCase_							=				apply_table(message, IP)
							UpperCAmelCase_							=				function(expansion, sa, sa, keya, temp)
							UpperCAmelCase_							=				temp[4:] + temp[:4]
							UpperCAmelCase_							=				function(expansion, sa, sa, keya, temp)
							UpperCAmelCase_							=				apply_table(temp, IP_inv)
							print("""Cipher text is:""", CT)

							# decryption
							UpperCAmelCase_							=				apply_table(CT, IP)
							UpperCAmelCase_							=				function(expansion, sa, sa, keya, temp)
							UpperCAmelCase_							=				temp[4:] + temp[:4]
							UpperCAmelCase_							=				function(expansion, sa, sa, keya, temp)
							UpperCAmelCase_							=				apply_table(temp, IP_inv)
							print("""Plain text after decypting is:""", PT)

"""simple docstring"""




from ..utils import (
    OptionalDependencyNotAvailable,
    is_flax_available,
    is_scipy_available,
    is_torch_available,
    is_torchsde_available,
)


try:
						if not is_torch_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ..utils.dummy_pt_objects import *  # noqa F403
else:
						from .scheduling_consistency_models import CMStochasticIterativeScheduler
						from .scheduling_ddim import DDIMScheduler
						from .scheduling_ddim_inverse import DDIMInverseScheduler
						from .scheduling_ddim_parallel import DDIMParallelScheduler
						from .scheduling_ddpm import DDPMScheduler
						from .scheduling_ddpm_parallel import DDPMParallelScheduler
						from .scheduling_deis_multistep import DEISMultistepScheduler
						from .scheduling_dpmsolver_multistep import DPMSolverMultistepScheduler
						from .scheduling_dpmsolver_multistep_inverse import DPMSolverMultistepInverseScheduler
						from .scheduling_dpmsolver_singlestep import DPMSolverSinglestepScheduler
						from .scheduling_euler_ancestral_discrete import EulerAncestralDiscreteScheduler
						from .scheduling_euler_discrete import EulerDiscreteScheduler
						from .scheduling_heun_discrete import HeunDiscreteScheduler
						from .scheduling_ipndm import IPNDMScheduler
						from .scheduling_k_dpm_2_ancestral_discrete import KDPMaAncestralDiscreteScheduler
						from .scheduling_k_dpm_2_discrete import KDPMaDiscreteScheduler
						from .scheduling_karras_ve import KarrasVeScheduler
						from .scheduling_pndm import PNDMScheduler
						from .scheduling_repaint import RePaintScheduler
						from .scheduling_sde_ve import ScoreSdeVeScheduler
						from .scheduling_sde_vp import ScoreSdeVpScheduler
						from .scheduling_unclip import UnCLIPScheduler
						from .scheduling_unipc_multistep import UniPCMultistepScheduler
						from .scheduling_utils import KarrasDiffusionSchedulers, SchedulerMixin
						from .scheduling_vq_diffusion import VQDiffusionScheduler

try:
						if not is_flax_available():
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ..utils.dummy_flax_objects import *  # noqa F403
else:
						from .scheduling_ddim_flax import FlaxDDIMScheduler
						from .scheduling_ddpm_flax import FlaxDDPMScheduler
						from .scheduling_dpmsolver_multistep_flax import FlaxDPMSolverMultistepScheduler
						from .scheduling_karras_ve_flax import FlaxKarrasVeScheduler
						from .scheduling_lms_discrete_flax import FlaxLMSDiscreteScheduler
						from .scheduling_pndm_flax import FlaxPNDMScheduler
						from .scheduling_sde_ve_flax import FlaxScoreSdeVeScheduler
						from .scheduling_utils_flax import (
						    FlaxKarrasDiffusionSchedulers,
						    FlaxSchedulerMixin,
						    FlaxSchedulerOutput,
						    broadcast_to_shape_from_left,
						)


try:
						if not (is_torch_available() and is_scipy_available()):
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ..utils.dummy_torch_and_scipy_objects import *  # noqa F403
else:
						from .scheduling_lms_discrete import LMSDiscreteScheduler

try:
						if not (is_torch_available() and is_torchsde_available()):
												raise OptionalDependencyNotAvailable()
except OptionalDependencyNotAvailable:
						from ..utils.dummy_torch_and_torchsde_objects import *  # noqa F403
else:
						from .scheduling_dpmsolver_sde import DPMSolverSDEScheduler