You first compare target-digest with all endpoints. If it's a match with any of them, good. Then you know a pre-image is in that column.
If not, then try H(R_last(target-digest)). Does it match any endpoint?
If not, then try H(R_last(H(R_second-to-last(target-digest))).
Rinse and repeat.
You first compare target-digest with all endpoints. If it's a match with any of them, good. Then you know a pre-image is in that column.
If not, then try H(R_last(target-digest)). Does it match any endpoint?
If not, then try H(R_last(H(R_second-to-last(target-digest))).
Rinse and repeat.