

"""simple docstring"""






def 		lowerCamelCase__		(					_lowerCamelCase   ):

    '''simple docstring'''



    _lowerCAmelCase       :   List[Any]  =    [1]

    _lowerCAmelCase,					_lowerCAmelCase,					_lowerCAmelCase       :   List[str]  =    0, 0, 0
    _lowerCAmelCase       :   Union[str, Any]  =    ugly_nums[ia] * 2
    _lowerCAmelCase       :   Union[str, Any]  =    ugly_nums[ia] * 3
    _lowerCAmelCase       :   Optional[Any]  =    ugly_nums[ia] * 5

    for _ in range(1 ,   _lowerCamelCase   ):
        _lowerCAmelCase       :   List[Any]  =    min(_lowerCamelCase ,   _lowerCamelCase ,   _lowerCamelCase   )
        ugly_nums.append(_lowerCamelCase   )
        if next_num == next_a:
            ia += 1
            _lowerCAmelCase       :   Optional[Any]  =    ugly_nums[ia] * 2
        if next_num == next_a:
            ia += 1
            _lowerCAmelCase       :   Optional[Any]  =    ugly_nums[ia] * 3
        if next_num == next_a:
            ia += 1
            _lowerCAmelCase       :   Union[str, Any]  =    ugly_nums[ia] * 5
    return ugly_nums[-1]


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

 testmod(verbose=True)
 print(F'''{ugly_numbers(2_0_0) = }''')








"""simple docstring"""






from __future__ import annotations

def 		lowerCamelCase__		(					_lowerCamelCase   ):

    '''simple docstring'''



    create_state_space_tree(_lowerCamelCase ,   [] ,   0 ,   [0 for i in range(len(_lowerCamelCase   )   )]   )

def 		lowerCamelCase__		(					_lowerCamelCase ,   _lowerCamelCase ,   _lowerCamelCase ,   _lowerCamelCase ,   ):

    '''simple docstring'''



    if index == len(_lowerCamelCase   ):
        print(_lowerCamelCase   )
        return

    for i in range(len(_lowerCamelCase   )   ):
        if not index_used[i]:
            current_sequence.append(sequence[i]   )
            _lowerCAmelCase       :   List[str]  =    True
            create_state_space_tree(_lowerCamelCase ,   _lowerCamelCase ,   index + 1 ,   _lowerCamelCase   )
            current_sequence.pop()
            _lowerCAmelCase       :   int  =    False
_lowerCAmelCase						=		[3, 1, 2, 4]
generate_all_permutations(sequence)

_lowerCAmelCase						=		["A", "B", "C"]

generate_all_permutations(sequence_a)





