The only one that works in your example is "to."
"Contribute for" isn't very common, but you could say:
"...contribute to (something) for the purpose of (something else)..."
But it would be less wordy and much more natural to use the infinitive of purpose:
"...contribute to (something) to (base verb)..."
In this construction, the second "to" isn't a preposition, but rather a particle of the infinitive verb.
"Contribute with" isn't a common collocation because when "contribute" has a direct object, you don't need a preposition.
The bottom line is that you should strive to imitate the verb and preposition collocations that you see and hear natives use rather than trying to come up with new ones on your own.