





'''simple docstring'''






def      __A						(							a_						:  str      ,a_						:  int	):
		lowerCAmelCase     :    list[list[str]]						=   [[] for _ in range(a_	)]
		lowerCAmelCase     :    Dict						=   key - 1

		if key <= 0:
				raise ValueError("Height of grid can't be 0 or negative"	)
		if key == 1 or len(a_	) <= key:
				return input_string

		for position, character in enumerate(a_	):
				lowerCAmelCase     :    str						=   position % (lowest * 2)  # puts it in bounds
				lowerCAmelCase     :    Any						=   min(a_      ,lowest * 2 - num	)  # creates zigzag pattern
				temp_grid[num].append(a_	)
		lowerCAmelCase     :    int						=   ["".join(a_	) for row in temp_grid]
		lowerCAmelCase     :    int						=   "".join(a_	)

		return output_string






def      __A						(							a_						:  str      ,a_						:  int	):
		lowerCAmelCase     :    Any						=   []
		lowerCAmelCase     :    Dict						=   key - 1

		if key <= 0:
				raise ValueError("Height of grid can't be 0 or negative"	)
		if key == 1:
				return input_string

		lowerCAmelCase     :    list[list[str]]						=   [[] for _ in range(a_	)]  # generates template
		for position in range(len(a_	)	):
				lowerCAmelCase     :    Optional[Any]						=   position % (lowest * 2)  # puts it in bounds
				lowerCAmelCase     :    str						=   min(a_      ,lowest * 2 - num	)  # creates zigzag pattern
				temp_grid[num].append("*"	)

		lowerCAmelCase     :    str						=   0
		for row in temp_grid:  # fills in the characters
				lowerCAmelCase     :    Tuple						=   input_string[counter : counter + len(a_	)]
				grid.append(list(a_	)	)
				counter += len(a_	)

		lowerCAmelCase     :    Any						=   ""  # reads as zigzag
		for position in range(len(a_	)	):
				lowerCAmelCase     :    List[str]						=   position % (lowest * 2)  # puts it in bounds
				lowerCAmelCase     :    Dict						=   min(a_      ,lowest * 2 - num	)  # creates zigzag pattern
				output_string += grid[num][0]
				grid[num].pop(0	)
		return output_string






def      __A						(							a_						:  str	):
		lowerCAmelCase     :    Dict						=   {}
		for key_guess in range(1      ,len(a_	)	):  # tries every key
				lowerCAmelCase     :    Optional[int]						=   decrypt(a_      ,a_	)
		return results


if __name__ == "__main__":
					import doctest

					doctest.testmod()










'''simple docstring'''






def      __A						(							a_						:  int      ,a_						:  int	):
		return abs(a_	) if a == 0 else greatest_common_divisor(b % a      ,a_	)






def      __A						(							a_						:  int      ,a_						:  int	):
		while y:  # --> when y=0 then loop will terminate and return x as final GCD.
				lowerCAmelCase	,		lowerCAmelCase     :    Tuple						=   y, x % y
		return abs(a_	)






def      __A						(							):
		try:
				lowerCAmelCase     :    Tuple						=   input("Enter two integers separated by comma (,): "	).split(","	)
				lowerCAmelCase     :    Tuple						=   int(nums[0]	)
				lowerCAmelCase     :    Tuple						=   int(nums[1]	)
				print(
				    f'''greatest_common_divisor({num_a}, {num_a}) = '''
				    f'''{greatest_common_divisor(a_      ,a_	)}'''	)
				print(f'''By iterative gcd({num_a}, {num_a}) = {gcd_by_iterative(a_      ,a_	)}'''	)
		except (IndexError, UnboundLocalError, ValueError):
				print("Wrong input"	)


if __name__ == "__main__":
					main()



