#include <iostream>
using namespace std;
int main() {
int n, mat[100][100] = {0}, b, c;
cin >> n >> b >> c;
for (int i = 1; i <= n; ++i) {
int p = b;
for (int j = 1; j <= n; ++j) {
if (i % 2 == 0) { // Even rows
mat[i][j] = n * c - (j - 1) * c;
} else { // Odd rows
mat[i][j] = p;
p += b;
}
cout << mat[i][j] << " ";
}
cout << "\n";
}
/*
for (int i = 1; i <= n; ++i) {
for (int j = 1; j <= n; ++j) {
cout << mat[i][j] << " ";
}
cout << "\n";
} */
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgbiwgbWF0WzEwMF1bMTAwXSA9IHswfSwgYiwgYzsKCWNpbiA+PiBuID4+IGIgPj4gYzsKCWZvciAoaW50IGkgPSAxOyBpIDw9IG47ICsraSkgewoJCWludCBwID0gYjsKCQlmb3IgKGludCBqID0gMTsgaiA8PSBuOyArK2opIHsKCQkJaWYgKGkgJSAyID09IDApIHsgLy8gRXZlbiByb3dzCiAgICAgICAgICAgICAgICBtYXRbaV1bal0gPSBuICogYyAtIChqIC0gMSkgKiBjOwogICAgICAgICAgICB9IGVsc2UgeyAgICAgICAgICAvLyBPZGQgcm93cwogICAgICAgICAgICAgICAgbWF0W2ldW2pdID0gcDsKICAgICAgICAgICAgICAgIHAgKz0gYjsKICAgICAgICAgICAgfQoJCQljb3V0IDw8IG1hdFtpXVtqXSA8PCAiICI7CgkJfQoJCWNvdXQgPDwgIlxuIjsKCX0KCS8qCglmb3IgKGludCBpID0gMTsgaSA8PSBuOyArK2kpIHsKCQlmb3IgKGludCBqID0gMTsgaiA8PSBuOyArK2opIHsKCQkJY291dCA8PCBtYXRbaV1bal0gPDwgIiAiOwoJCX0KCQljb3V0IDw8ICJcbiI7Cgl9ICovCglyZXR1cm4gMDsKfQ==