I was on the bus and the beginning part just clicked in my head,
The rest I came up within a few minutes.
annnd, here you have yet another class assignment that I did way back.