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 JAVA):

Solution:
import static java.util.Arrays.*;
import static java.lang.Math.*;
import static java.math.BigInteger.*;
import java.util.*;
import java.math.*;
import java.io.*;

public class C implements Runnable
{
    String file = "input";
    
    void init() throws IOException
    {
        //input = new BufferedReader(new FileReader(file + ".in"));
        input = new BufferedReader(new InputStreamReader(System.in));
        out = new PrintWriter(new BufferedOutputStream(System.out));
    }
    
    void solve() throws IOException
    {
        int n = nextInt(), m = nextInt(), u = nextInt();
        if(!solve(n, m, u)) out.println(-1);
        else 
            for(int i = 0; i < as.size(); i++)
                out.println(as.get(i) + " " + bs.get(i));   
    }
    ArrayList<Integer> as = new ArrayList<Integer>(100001);
    ArrayList<Integer> bs = new ArrayList<Integer>(100001);
    
    boolean solve(int n, int m, int u)
    {
        if(m < n - 1) return false;
        for(int i = 1; i <= n; i++)
            if(i != u)
            {
                as.add(u);
                bs.add(i);
            }
        int v = -1;
        for(int i = 1; i <= n; i++)
            if(i != u)
                v = i;
        int s = 1, t = 2, j = n - 1;
        while(j < m && s < n)
        {
            if(t == v || t == u)
            {
                t++;
                continue;
            }
            if(s == u || s == v || t >= n)
            {
                s++;
                t = s + 1;
                continue;
            }
            as.add(s);
            bs.add(t++);
            j++;
        }
        if(j < m) return false;
        return true;
        
    }
    String next() throws IOException
    {
        while(st == null || !st.hasMoreTokens()) st = new StringTokenizer(input.readLine());
        return st.nextToken();
    }
    
    int nextInt() throws IOException
    {
        return Integer.parseInt(next());
    }
    
    long nextLong() throws IOException
    {
        return Long.parseLong(next());
    }
    
    double nextDouble() throws IOException
    {
        return Double.parseDouble(next());
    }
    
    void print(Object... o)
    {
        System.out.println(deepToString(o));
    }
    
    void gcj(Object o)
    {
        String s = String.valueOf(o);
        out.println("Case #" + test + ": " + s);
        System.out.println("Case #" + test + ": " + s);
    }
    
    BufferedReader input;
    PrintWriter out;
    StringTokenizer st;
    int test;
    
    public static void main(String[] args) throws IOException
    {
        new Thread(null, new C(), "", 1 << 20).start();
    }
    
    public void run()
    {
        try
        {
            init();
            solve();
            out.close();        
        }
        catch(Exception e)
        {
            e.printStackTrace();
            System.exit(1);
        }
    }
}