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.PrintWriter;
import java.io.OutputStream;
import java.util.Arrays;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.File;
import java.io.FileNotFoundException;
import java.util.ArrayList;
import java.util.AbstractCollection;
import java.util.StringTokenizer;
import java.io.Writer;
import java.io.BufferedReader;
import java.io.FileReader;
import java.util.LinkedList;
import java.io.InputStream;

/**
 * Built using CHelper plug-in
 * Actual solution is at the top
 * @author zodiacLeo
 */
public class Main
{
    public static void main(String[] args)
    {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        FastScanner in = new FastScanner(inputStream);
        FastPrinter out = new FastPrinter(outputStream);
        TaskA solver = new TaskA();
        solver.solve(1, in, out);
        out.close();
    }

    static class TaskA
    {
        private int V;
        private int E;

        public void solve(int testNumber, FastScanner in, FastPrinter out)
        {
            V = in.nextInt();
            E = in.nextInt();
            IntegerGraph g = new IntegerGraph(V, 0);
            for (int i = 0; i < E; i++)
            {
                int from = in.nextInt() - 1;
                int to = in.nextInt() - 1;
                g.addEdge(from, to, true);
            }

            ArrayList<Integer> v1 = new ArrayList<>();
            ArrayList<Integer> v2 = new ArrayList<>();

            int[] layer = new int[V];
            Arrays.fill(layer, -1);

            LinkedList<Integer> q = new LinkedList<>();
            for (int i = 0; i < V; i++)
            {
                if (layer[i] != -1)
                {
                    continue;
                }
                q.add(i);
                layer[i] = 0;

                boolean any = false;
                while (!q.isEmpty())
                {
                    Integer U = q.pollFirst();
                    ArrayList<Integer> next = g.g[U];
                    for (Integer V : next)
                    {
                        any = true;
                        if (layer[V] == -1)
                        {
                            layer[V] = (layer[U] == 0) ? 1 : 0;
                            q.add(V);
                            if (layer[V] == 0)
                            {
                                v1.add(V + 1);
                            } else
                            {
                                v2.add(V + 1);
                            }
                        } else
                        {
                            if (layer[U] == layer[V])
                            {
                                out.println(-1);
                                return;
                            }
                        }
                    }
                }
                if (any)
                {
                    v1.add(i + 1);
                }
            }
            out.println(v1.size());
            for (Integer i : v1)
            {
                out.print(i + " ");
            }
            out.println("\n" + v2.size());
            for (Integer i : v2)
            {
                out.print(i + " ");
            }
        }

    }

    static class IntegerGraph
    {
        public int V;
        public int startVertex;
        public int endVertex;
        public boolean[] was;
        public ArrayList[] g;

        public IntegerGraph(int V, int offset)
        {
            this.V = V;
            this.startVertex = offset;
            this.endVertex = offset + V - 1;

            was = new boolean[V + offset];
            g = new ArrayList[V + offset];
            for (int i = offset; i < V + offset; i++)
            {
                g[i] = new ArrayList<Integer>();
            }
        }

        public void addEdge(int from, int to, boolean bidirectional)
        {
            g[from].add(to);
            if (bidirectional)
            {
                g[to].add(from);
            }
        }

    }

    static class FastPrinter extends PrintWriter
    {
        public FastPrinter(OutputStream out)
        {
            super(out);
        }

        public FastPrinter(Writer out)
        {
            super(out);
        }

    }

    static class FastScanner
    {
        public BufferedReader br;
        public StringTokenizer st;

        public FastScanner(InputStream is)
        {
            br = new BufferedReader(new InputStreamReader(is));
        }

        public FastScanner(File f)
        {
            try
            {
                br = new BufferedReader(new FileReader(f));
            } catch (FileNotFoundException e)
            {
                e.printStackTrace();
            }
        }

        public String next()
        {
            while (st == null || !st.hasMoreElements())
            {
                String s = null;
                try
                {
                    s = br.readLine();
                } catch (IOException e)
                {
                    e.printStackTrace();
                }
                if (s == null)
                    return null;
                st = new StringTokenizer(s);
            }
            return st.nextToken();
        }

        public int nextInt()
        {
            return Integer.parseInt(next());
        }

    }
}