Given set of cubes solves puzzle problem