#include <iostream>
using namespace std;

struct point {
	
	int abscissa, ordinate;
	
	point() {
	    abscissa = 0;
	    ordinate = 0;
	}
	
	point(int x, int y) {
		abscissa = x;
		ordinate = y;
	}
	
	void setX(int x) {
	    abscissa = x;
	}
	
	void setY(int y) {
	    ordinate = y;
	}
	
	int getX() {
		return abscissa;
	}
	
	int getY() {
		return ordinate;
	}
	
};

struct size {
	
	int width, height;
	
	size() {
	    width = 0;
	    height = 0;
	}
	
	size(int w, int h) {
		width = w;
		height = h;
	}
	
	int getWidth() {
		return width;
	}
	
	int getHeight() {
		return height;
	}
	
};

struct screen {
	
	size dimension; // dimension of the screen
	point cursor; // position of the cursor
	char **arr; // array that represents characters on the screen
	
	// allocates the memory for the array and sets its dimension
	screen(size d) {
		dimension = d;
		arr = new char*[dimension.getWidth()];
		for(int i = 0; i < dimension.getWidth(); i++) {
			arr[i] = new char[dimension.getHeight()];
		}
	}
	
	// deallocates the memory for the array
	void deallocate() {
		for(int i = 0; i < dimension.getWidth(); i++) {
    		delete[] arr[i];
		}
		delete[] arr;
	}
	
	// fills each cell by character c
	void fill(char c) {
	    for(int i = 0; i < dimension.getWidth(); i++) {
	        for(int j = 0; j < dimension.getHeight(); j++) {
	            arr[i][j] = c;
	        }
	    }
	}
	
	// print integer where cursor is located and returns position of the cursor
	point print(int i) {
	    return print(to_string(i));
	}
	
	// print string where cursor is located and returns position of the cursor
	point print(string s) {
		for(int i = 0; i < s.length(); i++) {
		    arr[cursor.getX()][cursor.getY()] = s.at(i);
		    moveCursor();
		}
		return cursor;
	}
	
	// moves cursor to the right
	void moveCursor() {
		cursor.setX(cursor.getX() + 1 == dimension.getWidth() ? 0 : cursor.getX() + 1);
		cursor.setY(cursor.getX() == 0 ? cursor.getY() + 1 : cursor.getY());
	}
	
	
	// moves cursor to the point p
	void moveCursor(point p) {
		cursor.setX(p.getX());
		cursor.setY(p.getY());
	}
	
	// returns char located at point p
	char getChar(point p) {
	    return arr[p.getX()][p.getY()];
	}
	
	// returns dimension of the screen
	size getSize() {
		return dimension;
	}
	
};

// returns length of integer
int length(int number) {
    int result = 1;
    while((number /= 10) > 0) {
        result++;
    }
    return result;
}

// returns sum of lengths of integers from from to to
int length(int from, int to) {
    int result = 0;
    for(int i = from; i <= to; i++) {
        result += length(i);
    }
    return result;
}

int main() {
    int n, m, k;
    cin >> n >> m >> k;
    screen screen(size(length(1, k), k + 1));
    screen.fill('+');
    for(int i = 1; i <= k; i++) {
        screen.print(i);
    }
    for(int i = 1; i <= k; i++) {
    	screen.moveCursor(point(screen.getSize().getWidth() - length(i), i));
    	screen.print(i);
    }
    for(int row = 0; row < m; row++) {
        for(int col = 0; col < n; col++) {
            cout << screen.getChar(point(col % screen.getSize().getWidth(), row % screen.getSize().getHeight()));
        }
        cout << endl;
    }
    screen.deallocate();
	return 0;
}