Create Surprising String

http://acm.hdu.edu.cn/webcontest/contest_showproblem.php?pid=1001&ojid=1&cid=4091  from PKU