Donald Knuth's Dancing Links Algorithm X, extended