Topcoder 4624 SMS solution