how do i reset my phone and virginise it back to the state it was when I bought it?

It was a week 38 1.1.2 and i have jailbroken and unlocked then upgraded to 1.1.3 and unlocked/jailbroken

but i want to reset it and do the process again

???