





def  _SCREAMING_SNAKE_CASE				(   a					,						a  )      ->      str:
					__A	:						int       =				len(a  )
					__A	:						int       =				len(a  )
					__A	:						int       =				(
					    first_str_length if first_str_length > second_str_length else second_str_length
					)
					__A	:						list       =				[]
					for char_count in range(a  ):
										if char_count < first_str_length:
															output_list.append(first_str[char_count]  )
										if char_count < second_str_length:
															output_list.append(second_str[char_count]  )
					return "".join(a  )


if __name__ == "__main__":
				print(alternative_string_arrange('''AB''', '''XYZ'''), end=''' ''')











from __future__ import annotations

import math
import random
from collections.abc import Collection
from typing import overload





class 						_A:


				"""simple docstring"""


				def __init__(			self     ,					_A = None     ):
									if components is None:
														__A	:						int       =				[]
									__A	:						Tuple       =				list(_A     )



				def __len__(			self     ):
									return len(self.__components     )



				def __str__(			self     ):
									return "(" + ",".join(map(_A     ,					self.__components     )     ) + ")"



				def __add__(			self     ,					_A     ):
									__A	:						Optional[int]       =				len(self     )
									if size == len(_A     ):
														__A	:						Any       =				[self.__components[i] + other.component(_A     ) for i in range(_A     )]
														return Vector(_A     )
									else:
														raise Exception('must have the same size'     )



				def __sub__(			self     ,					_A     ):
									__A	:						Tuple       =				len(self     )
									if size == len(_A     ):
														__A	:						Union[str, Any]       =				[self.__components[i] - other.component(_A     ) for i in range(_A     )]
														return Vector(_A     )
									else:  # error case
														raise Exception('must have the same size'     )



				@overload
				def __mul__(			self     ,					_A     ):
									...



				@overload
				def __mul__(			self     ,					_A     ):
									...



				def __mul__(			self     ,					_A     ):
									if isinstance(_A     ,					(float, int)     ):
														__A	:						str       =				[c * other for c in self.__components]
														return Vector(_A     )
									elif isinstance(_A     ,					_A     ) and len(self     ) == len(_A     ):
														__A	:						Union[str, Any]       =				len(self     )
														__A	:						Dict       =				[self.__components[i] * other.component(_A     ) for i in range(_A     )]
														return sum(_A     )
									else:  # error case
														raise Exception('invalid operand!'     )



				def 					UpperCAmelCase_		(			self     ):
									return Vector(self.__components     )



				def 					UpperCAmelCase_		(			self     ,					_A     ):
									if isinstance(_A     ,					_A     ) and -len(self.__components     ) <= i < len(self.__components     ):
														return self.__components[i]
									else:
														raise Exception('index out of range'     )



				def 					UpperCAmelCase_		(			self     ,					_A     ,					_A     ):
									assert -len(self.__components     ) <= pos < len(self.__components     )
									__A	:						Optional[int]       =				value



				def 					UpperCAmelCase_		(			self     ):
									if len(self.__components     ) == 0:
														raise Exception('Vector is empty'     )
									__A	:						Optional[Any]       =				[c**2 for c in self.__components]
									return math.sqrt(sum(_A     )     )





				def 					UpperCAmelCase_		(			self     ,					_A     ,					_A = False     ):
									__A	:						Optional[Any]       =				self * other
									__A	:						Optional[Any]       =				self.euclidean_length() * other.euclidean_length()
									if deg:
														return math.degrees(math.acos(num / den     )     )
									else:
														return math.acos(num / den     )







def  _SCREAMING_SNAKE_CASE				(   a  )      ->      Vector:
					assert isinstance(a					,						a  )
					return Vector([0] * dimension  )







def  _SCREAMING_SNAKE_CASE				(   a					,						a  )      ->      Vector:
					assert isinstance(a					,						a  ) and (isinstance(a					,						a  ))
					__A	:						Optional[Any]       =				[0] * dimension
					__A	:						Tuple       =				1
					return Vector(a  )







def  _SCREAMING_SNAKE_CASE				(   a					,						a					,						a  )      ->      Vector:
					assert (
					    isinstance(a					,						a  )
					    and isinstance(a					,						a  )
					    and (isinstance(a					,						(int, float)  ))
					)
					return x * scalar + y







def  _SCREAMING_SNAKE_CASE				(   a					,						a					,						a  )      ->      Vector:
					random.seed(a  )
					__A	:						str       =				[random.randint(a					,						a  ) for _ in range(a  )]
					return Vector(a  )





class 						_A:


				"""simple docstring"""


				def __init__(			self     ,					_A     ,					_A     ,					_A     ):
									__A	:						Optional[Any]       =				matrix
									__A	:						Dict       =				w
									__A	:						Optional[int]       =				h



				def __str__(			self     ):
									__A	:						Tuple       =				''
									for i in range(self.__height     ):
														ans += "|"
														for j in range(self.__width     ):
																			if j < self.__width - 1:
																								ans += str(self.__matrix[i][j]     ) + ","
																			else:
																								ans += str(self.__matrix[i][j]     ) + "|\n"
									return ans



				def __add__(			self     ,					_A     ):
									if self.__width == other.width() and self.__height == other.height():
														__A	:						Optional[Any]       =				[]
														for i in range(self.__height     ):
																			__A	:						Optional[Any]       =				[
																			    self.__matrix[i][j] + other.component(_A     ,					_A     )
																			    for j in range(self.__width     )
																			]
																			matrix.append(_A     )
														return Matrix(_A     ,					self.__width     ,					self.__height     )
									else:
														raise Exception('matrix must have the same dimension!'     )



				def __sub__(			self     ,					_A     ):
									if self.__width == other.width() and self.__height == other.height():
														__A	:						Tuple       =				[]
														for i in range(self.__height     ):
																			__A	:						str       =				[
																			    self.__matrix[i][j] - other.component(_A     ,					_A     )
																			    for j in range(self.__width     )
																			]
																			matrix.append(_A     )
														return Matrix(_A     ,					self.__width     ,					self.__height     )
									else:
														raise Exception('matrices must have the same dimension!'     )



				@overload
				def __mul__(			self     ,					_A     ):
									...



				@overload
				def __mul__(			self     ,					_A     ):
									...



				def __mul__(			self     ,					_A     ):
									if isinstance(_A     ,					_A     ):  # matrix-vector
														if len(_A     ) == self.__width:
																			__A	:						List[Any]       =				zero_vector(self.__height     )
																			for i in range(self.__height     ):
																								__A	:						List[str]       =				[
																								    self.__matrix[i][j] * other.component(_A     )
																								    for j in range(self.__width     )
																								]
																								ans.change_component(_A     ,					sum(_A     )     )
																			return ans
														else:
																			raise Exception(
																			    'vector must have the same size as the '
																			    'number of columns of the matrix!'     )
									elif isinstance(_A     ,					(int, float)     ):  # matrix-scalar
														__A	:						List[str]       =				[
														    [self.__matrix[i][j] * other for j in range(self.__width     )]
														    for i in range(self.__height     )
														]
														return Matrix(_A     ,					self.__width     ,					self.__height     )
									return None



				def 					UpperCAmelCase_		(			self     ):
									return self.__height



				def 					UpperCAmelCase_		(			self     ):
									return self.__width



				def 					UpperCAmelCase_		(			self     ,					_A     ,					_A     ):
									if 0 <= x < self.__height and 0 <= y < self.__width:
														return self.__matrix[x][y]
									else:
														raise Exception('change_component: indices out of bounds'     )



				def 					UpperCAmelCase_		(			self     ,					_A     ,					_A     ,					_A     ):
									if 0 <= x < self.__height and 0 <= y < self.__width:
														__A	:						int       =				value
									else:
														raise Exception('change_component: indices out of bounds'     )



				def 					UpperCAmelCase_		(			self     ,					_A     ,					_A     ):
									if self.__height != self.__width:
														raise Exception('Matrix is not square'     )
									__A	:						List[str]       =				self.__matrix[:x] + self.__matrix[x + 1 :]
									for i in range(len(_A     )     ):
														__A	:						Optional[int]       =				minor[i][:y] + minor[i][y + 1 :]
									return Matrix(_A     ,					self.__width - 1     ,					self.__height - 1     ).determinant()



				def 					UpperCAmelCase_		(			self     ,					_A     ,					_A     ):
									if self.__height != self.__width:
														raise Exception('Matrix is not square'     )
									if 0 <= x < self.__height and 0 <= y < self.__width:
														return (-1) ** (x + y) * self.minor(_A     ,					_A     )
									else:
														raise Exception('Indices out of bounds'     )





				def 					UpperCAmelCase_		(			self     ):
									if self.__height != self.__width:
														raise Exception('Matrix is not square'     )
									if self.__height < 1:
														raise Exception('Matrix has no element'     )
									elif self.__height == 1:
														return self.__matrix[0][0]
									elif self.__height == 2:
														return (
														    self.__matrix[0][0] * self.__matrix[1][1]
														    - self.__matrix[0][1] * self.__matrix[1][0]
														)
									else:
														__A	:						List[str]       =				[
														    self.__matrix[0][y] * self.cofactor(0     ,					_A     ) for y in range(self.__width     )
														]
														return sum(_A     )







def  _SCREAMING_SNAKE_CASE				(   a  )      ->      Matrix:
					__A	:						list[list[float]]       =				[[0] * n for _ in range(a  )]
					return Matrix(a					,						a					,						a  )







def  _SCREAMING_SNAKE_CASE				(   a					,						a					,						a					,						a  )      ->      Matrix:
					random.seed(a  )
					__A	:						list[list[float]]       =				[
					    [random.randint(a					,						a  ) for _ in range(a  )] for _ in range(a  )
					]
					return Matrix(a					,						a					,						a  )




