#include<iostream>
#include<stdio.h>
#include<math.h>
#include<iomanip>
using namespace std;
int main()
{
int n;
int i, j;
cin >> n >> i >> j;
for (int p = 0; p < n; p++)
{
if (p == i)
{
for (int q = 0; q < n; q++)
{
cout << "(" << i<< "," <<q+1<< ")" << " ";
}
}
}
cout << "\n";
for (int p = 0; p < n; p++)
{
if (p == i)
{
for (int q = 0; q < n; q++)
{
cout << "(" << q+1 << "," << i+1 << ")"<<" ";
}
}
}
cout << "\n";
int q = i, p = j;
while (q > 1 && p > 1)
{
q--;
p--;
}
while (q<=i && p<=j)
{
cout<< "(" << q<< "," << p << ")"<<" ";
q++;
p++;
}
q = i, p = j;
while (q+1<=n && p+1<=n)
{
q++;
p++;
cout << "(" << q << "," << p << ")" << " ";
}
cout << "\n";
q = i, p = j;
while (q > 1 && p > 1)
{
q++;
p--;
}
while (q >=i && p <= j)
{
cout << "(" << q << "," << p << ")" << " ";
q--;
p++;
}
q = i-1, p = j+1;
while (q>0 && p <= n)
{
cout << "(" << q << "," << p << ")" << " ";
q--;
p++;
}
return 0;
}