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