Two rooms are adjacent if they share an edge. Albert wants to paint each room either red, blue, or green, such a path of rooms with color $X$ can be formed between any two rooms of color $X$. Each color must be used at least once. How many ways are there for Albert to paint his hotel?