



"""simple docstring"""

import doctest
from collections import deque

import numpy as np







class  __lowercase  :







						"""simple docstring"""







						def __init__(self							):
											snake_case_       :		Dict			       =       [2, 1, 2, -1]
											snake_case_       :		Tuple			       =       [1, 2, 3, 4]







						def     __UpperCamelCase				(self							):
											snake_case_       :		str			       =       len(self.first_signal							)
											snake_case_       :		Tuple			       =       len(self.second_signal							)

											snake_case_       :		str			       =       max(lowerCamelCase_ ,		lowerCamelCase_							)

											# create a zero matrix of max_length x max_length
											snake_case_       :		Union[str, Any]			       =       [[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_       :		Dict			       =       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_       :		Union[str, Any]			       =       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()








'''simple docstring'''






def    _snake_case  (	A					,       A			)		->       int:
							return x if y == 0 else greatest_common_divisor(A					,       x % y			)


def    _snake_case  (	A					,       A			)		->       int:
							return (x * y) // greatest_common_divisor(A					,       A			)


def    _snake_case  (	A = 20			)		->       int:
							lowerCAmelCase__			  =      1
							for i in range(1					,       n + 1			):
														lowerCAmelCase__			  =      lcm(A					,       A			)
							return g


if __name__ == "__main__":
		print(f"""{solution() = }""")