





import doctest
from collections import deque

import numpy as np


class 			lowercase				:



						"""simple docstring"""

						def __init__(    self			:		List[Any]					):





										'''simple docstring'''







										_snake_case :			int  						=   [2, 1, 2, -1]
										_snake_case :			Union[str, Any]  						=   [1, 2, 3, 4]







						def 		__UpperCAmelCase       (    self			:		Dict					):





										'''simple docstring'''







										_snake_case :			List[Any]  						=   len(self.first_signal					)
										_snake_case :			Any  						=   len(self.second_signal					)

										_snake_case :			int  						=   max(lowerCamelCase_ ,				lowerCamelCase_					)

										# create a zero matrix of max_length x max_length
										_snake_case :			List[str]  						=   [[0] * max_length for i in range(lowerCamelCase_					)]

										# fills the smaller signal with zeros to make both signals of same length
										if length_first_signal < length_second_signal:
														self.first_signal += [0] * (max_length - length_first_signal)
										elif length_first_signal > length_second_signal:
														self.second_signal += [0] * (max_length - length_second_signal)
										for i in range(lowerCamelCase_					):
														_snake_case :			List[Any]  						=   deque(self.second_signal					)
														rotated_signal.rotate(lowerCamelCase_					)
														for j, item in enumerate(lowerCamelCase_					):
																		matrix[i][j] += item

        # multiply the matrix with the first signal
										_snake_case :			int  						=   np.matmul(np.transpose(lowerCamelCase_					) ,				np.transpose(self.first_signal					)					)

										# rounding-off to two decimal places
										return [round(lowerCamelCase_ ,				2					) for i in final_signal]


if __name__ == "__main__":
		doctest.testmod()













def       A__(		__lowerCAmelCase ):

				if not isinstance(__lowerCAmelCase	,			__lowerCAmelCase ):
								raise TypeError('only integers accepted as input' )
				else:
								_snake_case :			Any  						=   str(abs(__lowerCAmelCase ) )
								_snake_case :			List[str]  						=   [list(__lowerCAmelCase ) for char in range(len(__lowerCAmelCase ) )]
								for index in range(len(__lowerCAmelCase ) ):
												num_transpositions[index].pop(__lowerCAmelCase )
								return max(
								    int(''.join(list(__lowerCAmelCase ) ) ) for transposition in num_transpositions )


if __name__ == "__main__":
		__import__('''doctest''').testmod()






