



def 		lowerCAmelCase__     (       UpperCamelCase_					:							int = 5_0						)->	int:
    A__					=       [[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() = }")





from __future__ import annotations



def 		lowerCAmelCase__     (       UpperCamelCase_					:							dict			,							UpperCamelCase_					:							str						)->	set[str]:
    A__			,						A__					=       set(UpperCamelCase_						), [start]

    while stack:
        A__					=       stack.pop()
        explored.add(UpperCamelCase_						)
        # Differences from BFS:
        # 1) pop last element instead of first one
        # 2) add adjacent elements to stack without exploring them
        for adj in reversed(graph[v]						):
            if adj not in explored:
                stack.append(UpperCamelCase_						)
    return explored


_lowercase    	=		{
    "A": ["B", "C", "D"],
    "B": ["A", "D", "E"],
    "C": ["A", "F"],
    "D": ["B", "D"],
    "E": ["B", "F"],
    "F": ["C", "E", "G"],
    "G": ["F"],
}

if __name__ == "__main__":
   import doctest

   doctest.testmod()
   print(depth_first_search(G, "A"))
