Warning! This script is very fragile. If your input is not exactly right, or you input a problem that doesn't have a solution, it may give a wrong result, or get caught in an infinite loop. If you don't get a response after a couple seconds, refresh the page and try again.

Use any single letter you want for the colors of the spaces and the tokens, and use capital letter "X" for the empty space or no token.

You can specify the spaces in any order, but you need to be consistent.

This program assumes exactly 1 empty space (X).

The example given here is for puzzle #7.

Spaces

Token starting positions

Links: for each pair of spaces that have a link between them, put the colors of the spaces. Put a space in between each pair.

Solution