import ren=input()s=input()print re.sub('\d+',lambda x:`int(x.group())*n`,s)
3 "This 1 is22a 3352sentence 50"
This 3 is66a 10056sentence 150
The brand new service which powers Ideone!
Widget for compiling and running the source code in a web browser!