#include <iostream>
#include <sstream>
#include <string>
#include <algorithm>
#include <cstdlib>
std::string box(int n) {
std::stringstream s;
int m = n - 1;
for (int y = -m; y <= m; ++y) {
for (int x = -m; x <= m; ++x) {
s << (std::max(std::abs(x),std::abs(y)) + 1) << ' ';
}
s << std::endl;
}
return s.str();
}
int main()
{
std::cout << box(2);
std::cout << box(5);
return 0;
}