while 1: s='' l=raw_input() for c in l: if c.isdigit(): for n in range(int(c)):s+=c else:s+=c print s