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:
/* package whatever; // don't place package name! */
 
import java.util.*;
import java.lang.*;
import java.io.*;
 
/* Name of the class has to be "Main" only if the class is public. */
public class bbg
{
	public static int result;
 
public static ArrayList<Integer> [] graph;
 
public static int[]cats;
 
public static int vizitat[];
public static int x;
 
 
	public static void main (String[] args) throws java.lang.Exception
{
 
Scanner input=new Scanner(System.in);
 
HashMap<Integer, Integer> map1= new HashMap<Integer, Integer>();
HashMap<Integer, Integer> map2= new HashMap<Integer, Integer>();
 
     ArrayList<String> arrayList = new ArrayList<String>();
 
 
 
	int n=input.nextInt();
 
	int m=input.nextInt();
 
//		ArrayList<Integer[]>  graph=new ArrayList<Integer[]>() ;
 
	vizitat=new int[n+1];
 
	graph=new ArrayList[n+1];
 
 
 
	for(int i=0;i<=n;i++) graph[i]=new ArrayList<>();
 
	int a,b;
 
	for (int i=0;i<m;i++){
 
	a=input.nextInt();
	b=input.nextInt();
 
	graph[a].add(b);
	graph[b].add(a);
 
 
 
	}
 
	 x=1;
	 int c=1;
 
	 for(int i=1;i<=n;i++)
	 functie(i,map1,map2,c);
 
 
 
 
 
 
 
 if(x==1){
	 System.out.println(map1.size());
	 for(int k:map1.keySet()) System.out.print(k+" ");
	 System.out.println();
	  System.out.println(map2.size());
	 for(int k:map2.keySet()) System.out.print(k+" ");
 
 }
 
 
	 else if(x==0) System.out.println(-1);
 
 
 
 
 
}
 
public static void functie(int a, HashMap<Integer,Integer> unu,
HashMap<Integer,Integer> doi,int d){
 
	if(graph[a].size()>0 && vizitat[a]==0)
	{
	 vizitat[a]=1;
	 
if(	 !unu.containsKey(a) && !doi.containsKey(a))
	unu.put(a,1);
	
 if(unu.containsKey(a)&& x==1)
 
{
 
 
	for(int b:graph[a]){
 
	if(unu.containsKey(b)) x=0;
	else doi.put(b,1);
	
 


 
 
	if(vizitat[b]==0)
	functie(b,unu,doi,1-d);
 
 }
 
 
 
 
 
	}
	
	
	else if(doi.containsKey(a)&& x==1)
 
{
 
 
	for(int b:graph[a]){
 
	if(doi.containsKey(b)) x=0;
	else unu.put(b,1);
	
 


 
 
	if(vizitat[b]==0)
	functie(b,unu,doi,1-d);
 
 }
 
 
 
 
 
	}
	
	
	
 
 
	}
	

 
 
}
 
			}