Pyramid Transition Matrix

Given a base row of blocks (as a string) and allowed pyramid mappings, determine if the pyramid can be built to the top.

Examples
Input: ["BCD",["BCC","CDE","CEA","FFF"]]
Output: true
Hints

Pyramid Transition Matrix

Given a base row of blocks (as a string) and allowed pyramid mappings, determine if the pyramid can be built to the top.