






"""simple docstring"""






def 					_A			(__a    ,				__a							) ->       Optional[int]:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_      :  List[Any]    						=		[1]
    for i in range(2    ,				__a							):
        factorials.append(factorials[-1] * i							)
    assert 0 <= k < factorials[-1] * n, "k out of bounds"

    SCREAMING_SNAKE_CASE_      :  Tuple    						=		[]
    SCREAMING_SNAKE_CASE_      :  Dict    						=		list(range(__a							)							)

    # Find permutation
    while factorials:
        SCREAMING_SNAKE_CASE_      :  List[str]    						=		factorials.pop()
        SCREAMING_SNAKE_CASE_						,			SCREAMING_SNAKE_CASE_      :  Union[str, Any]    						=		divmod(__a    ,				__a							)
        permutation.append(elements[number]							)
        elements.remove(elements[number]							)
    permutation.append(elements[0]							)

    return permutation


if __name__ == "__main__":
  import doctest

  doctest.testmod()










"""simple docstring"""






def 					_A			(__a = 50							) ->       int:
    """simple docstring"""






    SCREAMING_SNAKE_CASE_      :  Tuple    						=		[[0] * 3 for _ in range(length + 1							)]

    for row_length in range(length + 1							):
        for tile_length in range(2    ,				5							):
            for tile_start in range(row_length - tile_length + 1							):
                different_colour_ways_number[row_length][tile_length - 2] += (
                    different_colour_ways_number[row_length - tile_start - tile_length][
                        tile_length - 2
                    ]
                    + 1
                )

    return sum(different_colour_ways_number[length]							)


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


