You understand that isn't the same mathematically as reversing the hash? If you farm the set of all possible x and try them to see what works you do not have an inverse function in your hands.
I'm not sure I follow, what do I have then? Could you give me an example?