AOJ 1296 - Repeated Substitution with Sedhttp://judge.u-aizu.ac.jp/onlinejudge/description.jsp?id=1296 POJ 3803 - Repeated Substitution with Sed と同じ.