Problem: Bob got a job as a system administrator in X corporation. His first task was to connect n servers with the help of m two-way direct connection so that it becomes possible to transmit data from one server to any other server via these connections. Each direct connection has to link two different servers, each pair of servers should have at most one direct connection. Y corporation, a business rival of X corporation, made Bob an offer that he couldn't refuse: Bob was asked to connect the servers in such a way, that when server with index v fails, the transmission of data between some other two servers becomes impossible, i.e. the system stops being connected. Help Bob connect the servers.

Input

The first input line contains 3 space-separated integer numbers n, m, v (3 ≤ n ≤ 105, 0 ≤ m ≤ 105, 1 ≤ v ≤ n), n — amount of servers, m — amount of direct connections, v — index of the server that fails and leads to the failure of the whole system.

Output

If it is impossible to connect the servers in the required way, output -1. Otherwise output m lines with 2 numbers each — description of all the direct connections in the system. Each direct connection is described by two numbers — indexes of two servers, linked by this direct connection. The servers are numbered from 1. If the answer is not unique, output any.

Examples

Input

5 6 3


Output

1 2
2 3
3 4
4 5
1 3
3 5


Input

6 100 1


Output

-1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
template <class T>
inline T lcm(T a, T b) {
  if (a < 0) return lcm(-a, b);
  if (b < 0) return lcm(a, -b);
  return a * (b / __gcd(a, b));
}
template <class T>
T power(T N, T P) {
  return (P == 0) ? 1 : N * power(N, P - 1);
}
long long toInt64(string s) {
  long long r = 0;
  istringstream sin(s);
  sin >> r;
  return r;
}
double LOG(double N, double B) { return (log10l(N)) / (log10l(B)); }
string itoa(long long a) {
  if (a == 0) return "0";
  string ret;
  for (long long i = a; i > 0; i = i / 10) ret.push_back((i % 10) + 48);
  reverse(ret.begin(), ret.end());
  return ret;
}
vector<string> token(char *s, char *d) {
  vector<string> v;
  char *pch = strtok(s, d);
  while (pch) {
    v.push_back(pch);
    pch = strtok(NULL, d);
  }
  return v;
}
int toggle(int N, int pos) {
  if ((N & (1 << (pos)))) return N = (N & ~(1 << (pos)));
  return N = (N | (1 << (pos)));
}
void pbit(int N) {
  printf("(");
  for (int i = 10; i >= 0; i--) {
    bool x = (N & (1 << (i)));
    cout << x;
  }
  puts(")");
}
int fx[] = {0, 0, 1, -1, 1, -1, 1, -1};
int fy[] = {-1, 1, 0, 0, -1, -1, 1, 1};
int main() {
  int n, e, x;
  scanf("%d%d", &n, &e);
  scanf("%d", &x);
  int ee = e;
  if (e < (n - 1))
    puts("-1");
  else {
    e -= (n - 1);
    int sel = -1;
    for (int i = 1; i <= (int)n - 2; i++) {
      long long d = i;
      long long u = n - d - 1;
      long long dn = (d * (d - 1)) / 2;
      long long un = (u * (u - 1)) / 2;
      if (dn + un >= e) {
        sel = i;
        break;
      }
    }
    if (sel == -1)
      puts("-1");
    else {
      int selu = n - sel - 1;
      bool vis[100002] = {0};
      int tk = 0, c = 0;
      vector<int> up, dow;
      vector<pair<int, int> > out;
      for (int i = 1; i <= n and tk < sel; i++) {
        if (i != x) {
          out.push_back(pair<int, int>(i, x));
          tk++;
          vis[i] = 1;
          dow.push_back(i);
          c++;
        }
      }
      tk = 0;
      for (int i = 1; i <= n and tk < selu; i++) {
        if (i != x and !vis[i]) {
          out.push_back(pair<int, int>(i, x));
          tk++;
          up.push_back(i);
          c++;
        }
      }
      for (int i = 0; i < (int)(int)dow.size(); i++) {
        if (!e) break;
        for (int j = i + 1; j < (int)dow.size() and e; j++) {
          int u = dow[i];
          int v = dow[j];
          out.push_back(pair<int, int>(u, v));
          e--;
        }
      }
      for (int i = 0; i < (int)(int)up.size(); i++) {
        if (!e) break;
        for (int j = i + 1; j < (int)up.size() and e; j++) {
          int u = up[i];
          int v = up[j];
          out.push_back(pair<int, int>(u, v));
          e--;
        }
      }
      for (int i = 0; i < (int)out.size(); i++)
        printf("%d %d\n", out[i].first, out[i].second);
    }
  }
  return 0;
}