Problem: Valera conducts experiments with algorithms that search for shortest paths. He has recently studied the Floyd's algorithm, so it's time to work with it.

Valera's already written the code that counts the shortest distance between any pair of vertexes in a non-directed connected graph from n vertexes and m edges, containing no loops and multiple edges. Besides, Valera's decided to mark part of the vertexes. He's marked exactly k vertexes a1, a2, ..., ak.

Valera's code is given below.
    
    
      
    ans[i][j] // the shortest distance for a pair of vertexes i, j  
    a[i]  // vertexes, marked by Valera  
      
    for(i = 1; i <= n; i++) {  
        for(j = 1; j <= n; j++) {  
            if (i == j)  
                ans[i][j] = 0;  
            else  
                ans[i][j] = INF;  //INF is a very large number   
        }  
    }      
      
    for(i = 1; i <= m; i++) {  
        read a pair of vertexes u, v that have a non-directed edge between them;  
        ans[u][v] = 1;  
        ans[v][u] = 1;  
    }  
      
    for (i = 1; i <= k; i++) {  
        v = a[i];  
        for(j = 1; j <= n; j++)  
            for(r = 1; r <= n; r++)  
                ans[j][r] = min(ans[j][r], ans[j][v] + ans[v][r]);  
    }  
    

Valera has seen that his code is wrong. Help the boy. Given the set of marked vertexes a1, a2, ..., ak, find such non-directed connected graph, consisting of n vertexes and m edges, for which Valera's code counts the wrong shortest distance for at least one pair of vertexes (i, j). Valera is really keen to get a graph without any loops and multiple edges. If no such graph exists, print -1.

Input

The first line of the input contains three integers n, m, k (3 ≤ n ≤ 300, 2 ≤ k ≤ n , <image>) — the number of vertexes, the number of edges and the number of marked vertexes. 

The second line of the input contains k space-separated integers a1, a2, ... ak (1 ≤ ai ≤ n) — the numbers of the marked vertexes. It is guaranteed that all numbers ai are distinct.

Output

If the graph doesn't exist, print -1 on a single line. Otherwise, print m lines, each containing two integers u, v — the description of the edges of the graph Valera's been looking for.

Examples

Input

3 2 2
1 2


Output

1 3
2 3


Input

3 3 2
1 2


Output

-1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
ifstream fin("knights.in");
ofstream fout("knights.out");
bool isPrime(int x) {
  if (x <= 4 || x % 2 == 0 || x % 3 == 0) return x == 2 || x == 3;
  for (int i = 5; i * i <= x; i += 6)
    if (x % i == 0 || x % (i + 2) == 0) return 0;
  return 1;
}
int NumDigits(int x) {
  return (
      x < 10
          ? 1
          : (x < 100
                 ? 2
                 : (x < 1000
                        ? 3
                        : (x < 10000
                               ? 4
                               : (x < 100000
                                      ? 5
                                      : (x < 1000000
                                             ? 6
                                             : (x < 10000000
                                                    ? 7
                                                    : (x < 100000000
                                                           ? 8
                                                           : (x < 1000000000
                                                                  ? 9
                                                                  : 10)))))))));
}
inline void boostIO() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  cout << fixed << setprecision(10);
}
long long int Pow10[19] = {
    (long long int)1,    (long long int)1e1,  (long long int)1e2,
    (long long int)1e3,  (long long int)1e4,  (long long int)1e5,
    (long long int)1e6,  (long long int)1e7,  (long long int)1e8,
    (long long int)1e9,  (long long int)1e10, (long long int)1e11,
    (long long int)1e12, (long long int)1e13, (long long int)1e14,
    (long long int)1e15, (long long int)1e16, (long long int)1e17,
    (long long int)1e18};
long long int gcd(long long int a, long long int b) {
  return b ? gcd(b, a % b) : a;
}
long long int lcm(long long int a, long long int b) {
  return a * b / gcd(a, b);
}
long long Mod = 1e9 + 7;
template <class T>
struct Fenwick {
  vector<T> V;
  Fenwick(long long n) : V(n) {}
  void add(size_t i, T x) {
    for (; i < V.size(); i |= i + 1) V[i] += x;
  }
  T sum(long long i) {
    T r = T();
    for (--i; i >= 0; i = (i & (i + 1)) - 1) r += V[i];
    return r;
  }
  T sum(long long l, long long r) { return sum(r) - sum(l); }
};
long long mul(long long a, long long b, long long c = 1, long long d = 1,
              long long e = 1, long long g = 1) {
  a %= Mod;
  b %= Mod;
  c %= Mod;
  d %= Mod;
  e %= Mod;
  g %= Mod;
  return (a * b % Mod * c % Mod * d % Mod * e % Mod * g % Mod);
}
long long Pow(long long a, long long b) {
  if (b == 0) return 1;
  if (b % 2 == 0) {
    long long x = Pow(a, b / 2);
    return mul(x, x);
  } else {
    long long x = Pow(a, b / 2);
    return mul(a, x, x);
  }
}
long long inf = 1e18;
struct cords {
  long long x = 0;
  long long y = 0;
};
struct Tree {
  long long n = 1;
  vector<long long> t;
  Tree(long long nn) {
    while (n < nn) n *= 2;
    t.assign(n * 2, 0);
  }
  Tree(vector<long long>& A) {
    while (n < A.size()) n *= 2;
    t.assign(n * 2, 0);
    for (long long i = 0; i < (A.size()); ++i) {
      t[i + n] = A[i];
    }
    for (long long i = A.size() - 1; i >= 1; --i) {
      t[i] = t[i + i] + t[i + i + 1];
    }
  }
  long long get(long long i) {
    long long res = t[i += n];
    for (i /= 2; i; i /= 2) {
      res += t[i];
    }
    return res;
  }
  void set(long long l, long long r, long long x) {
    for (l += n, r += n; l <= r; l /= 2, r /= 2) {
      if (l & 1) t[l++] += x;
      ;
      if (~r & 1) t[r--] += x;
    }
  }
};
long long mypow(long long a, long long b = Mod - 2, long long k = Mod) {
  if (b == 0) return 1;
  long long tmp = mypow(a, b / 2, k);
  if ((b % 2) == 1)
    return mul(tmp, tmp, a);
  else
    return mul(tmp, tmp);
}
long long Xa[8] = {2, 2, -2, -2, 1, 1, -1, -1};
long long Ya[8] = {1, -1, 1, -1, 2, -2, 2, -2};
int32_t main() {
  boostIO();
  long long n, m, k;
  cin >> n >> m >> k;
  vector<long long> a(k);
  vector<long long> b(n);
  for (long long i = 0; i < (k); ++i) {
    cin >> a[i];
    a[i]--;
    b[a[i]] = 1;
  }
  if (k == n) {
    cout << -1 << '\n';
    return 0;
  }
  long long zd = 0;
  vector<long long> c(0);
  for (long long i = 0; i < (n); ++i) {
    if (b[i] == 0) {
      c.push_back(i);
      zd = i;
    }
  }
  for (long long i = 0; i < (k - 1); ++i) {
    c.push_back(a[i]);
  }
  long long sp = a[k - 1];
  long long sz = c.size();
  if ((sz * (sz - 1) / 2 + (n - k)) < m) {
    cout << -1 << '\n';
    return 0;
  }
  map<pair<long long, long long>, long long> Map;
  for (long long i = 0; i < c.size() - 1; ++i) {
    Map[{c[i], c[i + 1]}] = 1;
    Map[{c[i + 1], c[i]}] = 1;
    cout << c[i] + 1 << " " << c[i + 1] + 1 << '\n';
    m--;
  }
  Map[{zd, sp}] = 1;
  cout << zd + 1 << " " << sp + 1 << '\n';
  m--;
  for (long long i = 0; i < (c.size()); ++i) {
    for (long long j = i + 1; j < c.size(); ++j) {
      if (m == 0) break;
      if (Map[{c[i], c[j]}] == 0) {
        Map[{c[i], c[j]}] = 1;
        Map[{c[j], c[i]}] = 1;
        cout << c[i] + 1 << " " << c[j] + 1 << '\n';
        m--;
      }
    }
  }
  for (long long i = 0; i < n; ++i) {
    if (m == 0) break;
    if (b[i] == 0) {
      if (Map[{i, sp}] == 0) {
        Map[{i, sp}] = 1;
        Map[{sp, i}] = 1;
        cout << i + 1 << " " << sp + 1 << '\n';
        m--;
      }
    }
  }
  return 0;
}