#include <iostream>
#define int long long
using namespace std;
int n, m, v;
signed main()
{
ios::sync_with_stdio(false);
cin.tie(NULL), cout.tie(NULL);
cin >> n >> m >> v;
if(m < n - 1 || m > n * (n - 1) / 2) cout << -1 << endl;
else
{
for(int i = 1; i <= n; i++)
if(i != v)
cout << i << ' ' << v << endl;
m -= n - 1;
int pos = n;
if(pos == v) pos--;
for(int i = 1; i <= n - 1; i++)
if(i != pos && i != v)
for(int j = i + 1; j <= n; j++)
if(j != pos && j != v)
{
cout << i << ' ' << j << endl, m--;
if(!m) goto finish;
}
finish: ;
}
return 0;
}
谢谢