Question (Q)How to flash back to stock?

I need to send a phone into Tmobile. How do i get everything back to bone stock(recovery, stock no SU) Its unlocked but, stock would atleast be better.