#include <iostream>
#include <cmath>
using namespace std;
int main() {
int m, n, k;
cin >> m >> n >> k;
for (int i = 1; i <= m; i++) {
int num = i % (2*k) <= k ? i % (2*k) : 2*k - i % (2*k);
if (num == 2*k) num = 0;
bool up = i % (2*k) < k ? true : false;
for (int j = 1; j <= n; j ++) {
if (num == 0) cout << "+";
else cout << num;
if (num == k) up = false;
else if (num == 0) up = true;
num = up ? num + 1 : num - 1;
}
cout << endl;
}
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgojaW5jbHVkZSA8Y21hdGg+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CgppbnQgbWFpbigpIHsKCWludCBtLCBuLCBrOwoJY2luID4+IG0gPj4gbiA+PiBrOwoJZm9yIChpbnQgaSA9IDE7IGkgPD0gbTsgaSsrKSB7CgkJaW50IG51bSA9IGkgJSAoMiprKSA8PSBrID8gaSAlICgyKmspIDogMiprIC0gaSAlICgyKmspOwoJCWlmIChudW0gPT0gMiprKSBudW0gPSAwOwoJCWJvb2wgdXAgPSBpICUgKDIqaykgPCBrID8gdHJ1ZSA6IGZhbHNlOwoJCWZvciAoaW50IGogPSAxOyBqIDw9IG47IGogKyspIHsKCQkJaWYgKG51bSA9PSAwKSBjb3V0IDw8ICIrIjsKCQkJZWxzZSBjb3V0IDw8IG51bTsKCQkJaWYgKG51bSA9PSBrKSB1cCA9IGZhbHNlOwoJCQllbHNlIGlmIChudW0gPT0gMCkgdXAgPSB0cnVlOwoJCQludW0gPSB1cCA/IG51bSArIDEgOiBudW0gLSAxOwoJCX0KCQljb3V0IDw8IGVuZGw7Cgl9CglyZXR1cm4gMDsKfQ==