




from __future__ import annotations


def 				_a       (				lowerCAmelCase						,	lowerCAmelCase						,	lowerCAmelCase   )->  tuple[float, float]:
		assert (
		    c % greatest_common_divisor(lowerCAmelCase						,	lowerCAmelCase   ) == 0
		)  # greatest_common_divisor(a,b) function implemented below
		((SCREAMING_SNAKE_CASE_)			,							(SCREAMING_SNAKE_CASE_)			,							(SCREAMING_SNAKE_CASE_))							=       extended_gcd(lowerCAmelCase						,	lowerCAmelCase   )  # extended_gcd(a,b) function implemented below
		SCREAMING_SNAKE_CASE_							=       c / d
		return (r * x, r * y)


def 				_a       (				lowerCAmelCase						,	lowerCAmelCase						,	lowerCAmelCase						,	lowerCAmelCase = 2   )->  None:
		((SCREAMING_SNAKE_CASE_)			,							(SCREAMING_SNAKE_CASE_))							=       diophantine(lowerCAmelCase						,	lowerCAmelCase						,	lowerCAmelCase   )  # Initial value
		SCREAMING_SNAKE_CASE_							=       greatest_common_divisor(lowerCAmelCase						,	lowerCAmelCase   )
		SCREAMING_SNAKE_CASE_							=       a // d
		SCREAMING_SNAKE_CASE_							=       b // d

		for i in range(lowerCAmelCase   ):
				SCREAMING_SNAKE_CASE_							=       xa + i * q
				SCREAMING_SNAKE_CASE_							=       ya - i * p
				print(lowerCAmelCase						,	lowerCAmelCase   )


def 				_a       (				lowerCAmelCase						,	lowerCAmelCase   )->  int:
		if a < b:
				SCREAMING_SNAKE_CASE_			,							SCREAMING_SNAKE_CASE_							=       b, a

		while a % b != 0:
				SCREAMING_SNAKE_CASE_			,							SCREAMING_SNAKE_CASE_							=       b, a % b

		return b


def 				_a       (				lowerCAmelCase						,	lowerCAmelCase   )->  tuple[int, int, int]:
		assert a >= 0 and b >= 0

		if b == 0:
				SCREAMING_SNAKE_CASE_			,							SCREAMING_SNAKE_CASE_			,							SCREAMING_SNAKE_CASE_							=       a, 1, 0
		else:
				((SCREAMING_SNAKE_CASE_)			,							(SCREAMING_SNAKE_CASE_)			,							(SCREAMING_SNAKE_CASE_))							=       extended_gcd(lowerCAmelCase						,	a % b   )
				SCREAMING_SNAKE_CASE_							=       q
				SCREAMING_SNAKE_CASE_							=       p - q * (a // b)

		assert a % d == 0 and b % d == 0
		assert d == a * x + b * y

		return (d, x, y)


if __name__ == "__main__":
						from doctest import testmod

						testmod(name='''diophantine''', verbose=True)
						testmod(name='''diophantine_all_soln''', verbose=True)
						testmod(name='''extended_gcd''', verbose=True)
						testmod(name='''greatest_common_divisor''', verbose=True)





from __future__ import annotations

import random
import string



class       lowercase_		:



						def __init__( self  :      str				,       snake_case__  :      str | None = None     ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_							=       passcode or self.__passcode_creator()
								SCREAMING_SNAKE_CASE_							=       self.__make_key_list()
								SCREAMING_SNAKE_CASE_							=       self.__make_shift_key()



						def __str__( self  :      List[Any]     ):

								"""simple docstring"""

								return "".join(self.__passcode     )



						def   __a				( self  :      Union[str, Any]				,       snake_case__  :      list[int]     ):

								"""simple docstring"""

								for i in range(1				,       len(snake_case__     )				,       2     ):
										iterlist[i] *= -1
								return iterlist



						def   __a				( self  :      str     ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_							=       string.ascii_letters + string.digits
								SCREAMING_SNAKE_CASE_							=       [random.choice(snake_case__     ) for _ in range(random.randint(10				,       20     )     )]
								return password



						def   __a				( self  :      str     ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_							=       (
								    string.ascii_letters + string.digits + string.punctuation + ' \t\n'
								)

								SCREAMING_SNAKE_CASE_							=       []

								# creates points known as breakpoints to break the key_list_options at those
								# points and pivot each substring
								SCREAMING_SNAKE_CASE_							=       sorted(set(self.__passcode     )     )
								SCREAMING_SNAKE_CASE_							=       []

								# algorithm for creating a new shuffled list, keys_l, out of key_list_options
								for i in key_list_options:
										temp_list.extend(snake_case__     )

										# checking breakpoints at which to pivot temporary sublist and add it into
										# keys_l
										if i in breakpoints or i == key_list_options[-1]:
												keys_l.extend(temp_list[::-1]     )
												temp_list.clear()

        # returning a shuffled keys_l to prevent brute force guessing of shift key
								return keys_l



						def   __a				( self  :      Union[str, Any]     ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_							=       sum(self.__neg_pos([ord(snake_case__     ) for x in self.__passcode]     )     )
								return num if num > 0 else len(self.__passcode     )



						def   __a				( self  :      str				,       snake_case__  :      str     ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_							=       ''

								# decoding shift like Caesar cipher algorithm implementing negative shift or
								# reverse shift or left shift
								for i in encoded_message:
										SCREAMING_SNAKE_CASE_							=       self.__key_list.index(snake_case__     )
										decoded_message += self.__key_list[
										    (position - self.__shift_key) % -len(self.__key_list     )
										]

								return decoded_message






						def   __a				( self  :      Optional[int]				,       snake_case__  :      str     ):

								"""simple docstring"""

								SCREAMING_SNAKE_CASE_							=       ''

								# encoding shift like Caesar cipher algorithm implementing positive shift or
								# forward shift or right shift
								for i in plaintext:
										SCREAMING_SNAKE_CASE_							=       self.__key_list.index(snake_case__     )
										encoded_message += self.__key_list[
										    (position + self.__shift_key) % len(self.__key_list     )
										]

								return encoded_message


def 				_a       (				lowerCAmelCase = "Hello, this is a modified Caesar cipher"   )->  str:
		SCREAMING_SNAKE_CASE_							=       ShuffledShiftCipher()
		return cipa.decrypt(cipa.encrypt(lowerCAmelCase   )   )


if __name__ == "__main__":
						import doctest

						doctest.testmod()