Problem: Recently, Pari and Arya did some research about NP-Hard problems and they found the minimum vertex cover problem very interesting.

Suppose the graph G is given. Subset A of its vertices is called a vertex cover of this graph, if for each edge uv there is at least one endpoint of it in this set, i.e. <image> or <image> (or both).

Pari and Arya have won a great undirected graph as an award in a team contest. Now they have to split it in two parts, but both of them want their parts of the graph to be a vertex cover.

They have agreed to give you their graph and you need to find two disjoint subsets of its vertices A and B, such that both A and B are vertex cover or claim it's impossible. Each vertex should be given to no more than one of the friends (or you can even keep it for yourself).

Input

The first line of the input contains two integers n and m (2 ≤ n ≤ 100 000, 1 ≤ m ≤ 100 000) — the number of vertices and the number of edges in the prize graph, respectively.

Each of the next m lines contains a pair of integers ui and vi (1 ≤ ui, vi ≤ n), denoting an undirected edge between ui and vi. It's guaranteed the graph won't contain any self-loops or multiple edges.

Output

If it's impossible to split the graph between Pari and Arya as they expect, print "-1" (without quotes).

If there are two disjoint sets of vertices, such that both sets are vertex cover, print their descriptions. Each description must contain two lines. The first line contains a single integer k denoting the number of vertices in that vertex cover, and the second line contains k integers — the indices of vertices. Note that because of m ≥ 1, vertex cover cannot be empty.

Examples

Input

4 2
1 2
2 3


Output

1
2 
2
1 3 


Input

3 3
1 2
2 3
1 3


Output

-1

Note

In the first sample, you can give the vertex number 2 to Arya and vertices numbered 1 and 3 to Pari and keep vertex number 4 for yourself (or give it someone, if you wish).

In the second sample, there is no way to satisfy both Pari and Arya.

Solution (in JAVA):

Solution:
import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.OutputStream;
import java.io.PrintWriter;
import java.io.BufferedWriter;
import java.io.Writer;
import java.io.OutputStreamWriter;
import java.io.IOException;
import java.util.ArrayList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 */
public class Main {
    public static void main(String[] args) throws IOException{
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        OutputWriter out = new OutputWriter(outputStream);
        ANPHardProblem solver = new ANPHardProblem();
        solver.solve(1, in, out);
        out.close();
    }

    static class ANPHardProblem {
        public static Node graph[] = new Node[100000];
        public static ArrayList<Node> even = new ArrayList<>();
        public static ArrayList<Node> odd = new ArrayList<>();
        public static boolean isAcyclicOrGoodCyclic = true;

        public void solve(int testNumber, InputReader in, OutputWriter out) throws IOException {
            int n = in.nextInt();
            int m = in.nextInt();
            for (int i = 0; i < n; i++)
                graph[i] = new Node(i + 1);
            {
                for (int i = 0; i < m; i++) {
                    int c1 = in.nextInt() - 1, c2 = in.nextInt() - 1;
                    graph[c1].connectedNodes.add(graph[c2]);
                    graph[c2].connectedNodes.add(graph[c1]);
                }
                spread(graph[0], true);
                for (int i = 1; i < n; i++) {
                    if ((!graph[i].isVisited) && graph[i].connectedNodes.size() != 0)
                        spread(graph[i], true);
                }
                if (!isAcyclicOrGoodCyclic)
                    out.printLine(-1);
                else {
                    out.printLine(odd.size());
                    for (int i = 0; i < odd.size(); i++)
                        out.print(odd.get(i).x + " ");
                    out.printLine();
                    out.printLine(even.size());
                    for (int i = 0; i < even.size(); i++)
                        out.print(even.get(i).x + " ");
                    out.printLine();
                }
            }
        }

        public void spread(Node N, boolean isEven) {
            if (isAcyclicOrGoodCyclic) {
                N.isVisited = true;
                N.isEvenNode = isEven;
                ((isEven) ? even : odd).add(N);
                Node x;
                for (int i = 0; i < N.connectedNodes.size(); i++) {
                    x = N.connectedNodes.get(i);
                    if (!x.isVisited) {
                        spread(x, !isEven);
                    } else if (x.isEvenNode == isEven)    //Has been already visited and has same sign => bad (odd numbered) cyclic
                    {
                        isAcyclicOrGoodCyclic = false;
                        break;
                    }

                }
            }
        }

        public class Node {
            boolean isVisited;
            boolean isEvenNode;
            int x;
            ArrayList<Node> connectedNodes;

            Node(int x) {
                this.x = x;
                isVisited = false;
                isEvenNode = false;
                connectedNodes = new ArrayList<>();
            }

        }

    }

    static class OutputWriter {
        private final PrintWriter writer;

        public OutputWriter(OutputStream outputStream) {
            writer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(outputStream)));
        }

        public OutputWriter(Writer writer) {
            this.writer = new PrintWriter(writer);
        }

        public void print(Object... objects) {
            for (int i = 0; i < objects.length; i++) {
                if (i != 0)
                    writer.print(' ');
                writer.print(objects[i]);
            }
        }

        public void printLine(Object... objects) {
            print(objects);
            writer.println();
        }

        public void close() {
            writer.close();
        }

    }

    static class InputReader {
        private static final int DEFAULT_BUFFER_SIZE = 1 << 16;
        private static final InputStream DEFAULT_STREAM = System.in;
        private int c;
        private byte[] buf;
        private int bufferSize;
        private int bufIndex;
        private int numBytesRead;
        private InputStream stream;
        private static final byte EOF = -1;
        private static final byte SPACE = 32;
        private static final byte DASH = 45;
        private char[] charBuffer;
        private static byte[] bytes = new byte[58];
        private static int[] ints = new int[58];
        private static char[] chars = new char[128];

        static {
            char ch = ' ';
            int value = 0;
            byte _byte = 0;
            for (int i = 48; i < 58; i++) bytes[i] = _byte++;
            for (int i = 48; i < 58; i++) ints[i] = value++;
            for (int i = 32; i < 128; i++) chars[i] = ch++;
        }

        public InputReader() {
            this(DEFAULT_STREAM, DEFAULT_BUFFER_SIZE);
        }

        public InputReader(int bufferSize) {
            this(DEFAULT_STREAM, bufferSize);
        }

        public InputReader(InputStream stream) {
            this(stream, DEFAULT_BUFFER_SIZE);
        }

        public InputReader(InputStream stream, int bufferSize) {
            if (stream == null || bufferSize <= 0)
                throw new IllegalArgumentException();
            buf = new byte[bufferSize];
            charBuffer = new char[128];
            this.bufferSize = bufferSize;
            this.stream = stream;
        }

        private int readJunk(int token) throws IOException {

            if (numBytesRead == EOF) return EOF;

            // Seek to the first valid position index
            do {

                while (bufIndex < numBytesRead) {
                    if (buf[bufIndex] > token) return 0;
                    bufIndex++;
                }

                // reload buffer
                numBytesRead = stream.read(buf);
                if (numBytesRead == EOF) return EOF;
                bufIndex = 0;

            } while (true);

        }

        public int nextInt() throws IOException {

            if (readJunk(DASH - 1) == EOF) throw new IOException();
            int sgn = 1, res = 0;

            c = buf[bufIndex];
            if (c == DASH) {
                sgn = -1;
                bufIndex++;
            }

            do {

                while (bufIndex < numBytesRead) {
                    if (buf[bufIndex] > SPACE) {
                        res = (res << 3) + (res << 1);
                        res += ints[buf[bufIndex++]];
                    } else {
                        bufIndex++;
                        return res * sgn;
                    }
                }

                // Reload buffer
                numBytesRead = stream.read(buf);
                if (numBytesRead == EOF) return res * sgn;
                bufIndex = 0;

            } while (true);

        }

    }
}