http://www.codechef.com/APRIL13/problems/LEMUSIC