Should work for heuristic 8.
Heuristic 9