#include <iostream>
using std:: cout ;
using std:: cin ;
using std:: endl ;
int main( )
{
int rows , columns , width , cycle;
char character;
if ( ! ( cin >> rows >> columns >> character >> cycle >> width ) )
{
cout << "Could not successfully read" << endl;
return ( 0 ) ;
}
for ( int gridrow = 0 ; gridrow < rows; ++ gridrow )
{
for ( int elementrow = 0 ; elementrow < width; ++ elementrow )
{
for ( int gridcolumn = 0 ; gridcolumn < columns; ++ gridcolumn )
{
for ( int elementcolumn = 0 ; elementcolumn < width; ++ elementcolumn )
{
cout << static_cast < char > ( character + ( gridrow + gridcolumn ) % cycle ) ;
}
cout << ' ' ;
}
cout << endl;
}
}
return 0 ;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgoKdXNpbmcgc3RkOjpjb3V0Owp1c2luZyBzdGQ6OmNpbjsKdXNpbmcgc3RkOjplbmRsOwoKaW50IG1haW4oKQp7CglpbnQgcm93cyAsIGNvbHVtbnMgLCB3aWR0aCAsIGN5Y2xlOwoJY2hhciBjaGFyYWN0ZXI7CgkKCWlmKCAhKCBjaW4gPj4gcm93cyA+PiBjb2x1bW5zID4+IGNoYXJhY3RlciA+PiBjeWNsZSA+PiB3aWR0aCApICkKCXsKCQljb3V0IDw8ICJDb3VsZCBub3Qgc3VjY2Vzc2Z1bGx5IHJlYWQiIDw8IGVuZGw7CgkJcmV0dXJuICggMCApOwoJfQoJCglmb3IoIGludCBncmlkcm93ID0gMDsgZ3JpZHJvdyA8IHJvd3M7ICsrZ3JpZHJvdyApCgl7CgkJZm9yKCBpbnQgZWxlbWVudHJvdyA9IDA7IGVsZW1lbnRyb3cgPCB3aWR0aDsgKytlbGVtZW50cm93ICkKCQl7CgkJCWZvciggaW50IGdyaWRjb2x1bW4gPSAwOyBncmlkY29sdW1uIDwgY29sdW1uczsgKytncmlkY29sdW1uICkKCQkJewoJCQkJZm9yKCBpbnQgZWxlbWVudGNvbHVtbiA9IDA7IGVsZW1lbnRjb2x1bW4gPCB3aWR0aDsgKytlbGVtZW50Y29sdW1uICkKCQkJCXsKCQkJCQljb3V0IDw8IHN0YXRpY19jYXN0PGNoYXI+KCBjaGFyYWN0ZXIgKyAoIGdyaWRyb3cgKyBncmlkY29sdW1uICkgJSBjeWNsZSApOwoJCQkJfQoJCQkJY291dCA8PCAnICc7CgkJCX0KCQljb3V0IDw8IGVuZGw7CgkJfQoJfQoJCglyZXR1cm4gMDsKfQ==