I'm submitting an mathematics article concerning research that was done entirely while I was an undergraduate at University A. This August I will be a graduate student at University B. The only funding I received came from NSF through a ten week program at University C at the very beginning of the project, after which I finished the research on my own while attending University A. On the other hand, while University B has nothing to do with the publication, it is the most up to date institution as far as contact information goes.
Should I put University A or University B as my affiliation (or both)?