while 1: l=raw_input() for n in range(10):l=l.replace(`n`,`n`*n) print l