while(a=readline()){a=a.split(" ");b="";c=a[0];while(1){for(i=a[2];i-->0;)b+=c;if(c==a[1])break;c=String.fromCharCode(c.charCodeAt(0)+1)}print(b)}