#include<stdio.h>
#pragma warning(disable : 4996)
void display(char cr, int lines, int width);
int main()
{
int ch;
int row, col;
while ((ch=getchar()) != '\n')
{
scanf("%d %d", &row, &col);
display(ch, row, col);
}
return 0;
}
void display(char cr, int lines, int width) {
int row;
int col;
for ( row = 1; row <= lines; row++)
{
for ( col = 1; col <= width; col++)
{
putchar(cr);
}
putchar('\n');
}
}