A floor plan is arranged as follows:

Create a function which validates whether the path between rooms is possible. The hallway will be given as the letter 'H'.
possiblePath([1, "H", 2, "H", 3, "H", 4]) ➞ true
possiblePath(["H", 3, "H"]) ➞ true
possiblePath([1, 2, "H", 3]) ➞ false