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