Sichuan University Programming Contest 2007 Final

I: In a Cycle