Need help!

There is 2 button , button1 and button2, 3 different modes, modeA ,modeB and modeC. Default mode will be modeA it will change to modeB if button1 is press. While in modeB if button2 is press within 10second, it will revert back to modeA, if not i will go to mode C after 10second. The program has to run continuously.

And?