while 1:x=raw_input();l,s=x[2:].split(' ',1);print s.rjust(int(l),x[0])