#include <fstream>
using namespace std;
ofstream cout("date.out");
int main()
{
int cnt = 4;
for (int i = 1; i <= 4; ++i)
{
for (int j = 1; j <= 4; ++j)
{
if (j != cnt)
{
cout << i << " ";
}
else
{
cout << 0 << " ";
}
}
cout << '\n';
cnt--;
}
cout.close();
return 0;
}