Knuth's Algorithm X