8 Tile Puzzle Problem With Hats