A $4\times 4$ window is made out of $16$ square windowpanes. How many ways are there to stain each of the
windowpanes, red, pink, or magenta, such that each windowpane is the same color as exactly two of
its neighbors? Two different windowpanes are neighbors if they share a side.