Generalization of the 15 Puzzle