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.*;
import java.util.*;

public class cf688c implements Runnable {
	public static final String taskname = cf688c.class.getName();
	
	public StringTokenizer strtok;
	public BufferedReader inr;
	public PrintWriter out;

	public static void main(String[] args) {
		new Thread(new cf688c()).start();
	}

	public void run() {
		Locale.setDefault(Locale.US);
		boolean oj = System.getProperty("ONLINE_JUDGE") != null;
		try {
			inr = new BufferedReader(oj ? new InputStreamReader(System.in, "ISO-8859-1") : new FileReader(taskname + ".in"));
			out = new PrintWriter(oj ? new OutputStreamWriter(System.out, "ISO-8859-1") : new FileWriter(taskname + ".out"));
			solve();
		} catch (Exception e) {
			if (!oj) {
				e.printStackTrace();
			}
			System.exit(9000);
		} finally {
			out.flush();
			out.close();
		}
	}

	public String nextToken() throws IOException {
		while (strtok == null || !strtok.hasMoreTokens()) {
			strtok = new StringTokenizer(inr.readLine());
		}
		return strtok.nextToken();
	}

	public int nextInt() throws NumberFormatException, IOException {
		return Integer.parseInt(nextToken());
	}

	public long nextLong() throws NumberFormatException, IOException {
		return Long.parseLong(nextToken());
	}

	public double nextDouble() throws NumberFormatException, IOException {
		return Double.parseDouble(nextToken());
	}

	// Debugging

	public static void printArray(boolean[][] a) {
		for (int i = 0; i < a.length; i++) {
			for (int j = 0; j < a[i].length; j++) {
				System.out.print(a[i][j] ? '#' : '.');
			}
			System.out.print('\n');
		}
	}

	// Solution

	public void solve() throws NumberFormatException, IOException {
		int n = nextInt(), m = nextInt();
		ArrayList<ArrayList<Integer>> g = new ArrayList<ArrayList<Integer>>(n);
		for (int i = 0; i < n; i++) {
			g.add(new ArrayList<Integer>());
		}
		for (int i = 0; i < m; i++) {
			int u = nextInt() - 1, v = nextInt() - 1;
			g.get(u).add(v);
			g.get(v).add(u);
		}
		Queue<Item> q = new LinkedList<Item>();
		boolean[] was = new boolean[n];
		for (int i = 0; i < n; i++) {
			was[i] = false;
		}
		int[] color = new int[n];
		int s1 = 0, s0 = 0;
		for (int i = 0; i < n; i++) {
			if (was[i]) {
				continue;
			}
			q.add(new Item(i, 0));
			while (!q.isEmpty()) {
				Item item = q.remove();
				if (was[item.a]) {
					continue;
				}
				was[item.a] = true;
				color[item.a] = item.b;
				if (item.b == 0) {
					s0++;
				}
				else {
					s1++;
				}
				for (int neigh : g.get(item.a)) {
					if (!was[neigh]) {
						q.add(new Item(neigh, 1 - item.b));
					}
					else {
						if (color[neigh] != 1 - item.b) {
							out.print(-1);
							return;
						}
					}
				}
			}
		}
		
		out.println(s0);
		
		ArrayList<Integer> ind0 = new ArrayList<Integer>();
		ArrayList<Integer> ind1 = new ArrayList<Integer>();
		
		for (int i = 0; i < n; i++) {
			if (color[i] == 0) {
				ind0.add(i);
			}
			else {
				ind1.add(i);
			}
		}
		
		for (int i : ind0) {
			out.printf("%d ", i + 1);
		}
		
		out.println();
		out.println(s1);
		
		for (int i : ind1) {
			out.printf("%d ", i + 1);
		}
	}
}

class Item {
	int a, b;

	public Item(int a, int b) {
		super();
		this.a = a;
		this.b = b;
	}
	
	
}