How to solve the snake cube puzzle