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.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.lang.reflect.Array;
import java.math.BigInteger;
import java.util.*;

/**
 * Created with IntelliJ IDEA.
 * User: olymp
 * Date: 13.09.15
 * Time: 11:00
 * To change this template use File | Settings | File Templates.
 */
public class Test {
    static BufferedReader in = null;
    static PrintWriter out = null;
    static StringTokenizer st = new StringTokenizer("");

    public static void main(String[] args) {
        try {
            in = new BufferedReader(new InputStreamReader(System.in));
            out = new PrintWriter(System.out);
            solve();

            out.close();
            in.close();
        } catch (Exception e) {
            e.printStackTrace();
        }
    }

    public static String readString() {
        while (!st.hasMoreTokens()) {
            try {
                st = new StringTokenizer(in.readLine());
            } catch (Exception e) {
                e.printStackTrace();
            }
        }
        return st.nextToken();
    }

    public static int readInt() {
        return Integer.parseInt(readString());
    }

    public static long readLong() {
        return Long.parseLong(readString());
    }

    public static double readDouble() {
        return Double.parseDouble(readString());
    }

    public static boolean isPalindrome(String s) {
        char[] x = s.toCharArray();
        for (int i = 0; i < s.length() / 2; i++) {
            if (x[i] != x[s.length() - 1 - i]) return false;
        }
        return true;
    }

    public static class Pair implements Comparable<Pair> {
        public double x, y;

        public Pair(double x, double y) {
            this.x = x;
            this.y = y;
        }

        @Override
        public int compareTo(Pair o) {
            if (Double.compare(this.x, o.x) != 0) return Double.compare(this.x, o.x);
            else return Double.compare(this.y, o.y);
        }
    }

    public static boolean isPrime(int x) {
        boolean prime = true;
        for (int i = 2; i * i <= x; i++) {
            if (x % i == 0) {
                prime = false;
                break;
            }
        }
        return prime;
    }

    private static int countDivisors(int x) {
        int count = 1;
        for (int i = 2; i * i <= x; i++) {
            while (x % i == 0) {
                count++;
                x /= i;
            }
        }
        if (x != 1) count++;
        return count;
    }


    public static long hash(char[] a) {
        long ans = 0;
        long pow = 31;
        for (int i = 0; i < a.length; i++) {
            ans += pow * a[i];
            pow *= 31;
        }
        return ans;
    }

    private static long mod = 1_000_000_007;

    private static long binPow(long x, int step) {
        if (step == 0) return 1;
        if (step == 1) return x % mod;
        if (step % 2 == 0) {
            long temp = binPow(x, step / 2) % mod;
            return (temp * temp) % mod;
        }
        return (x * binPow(x, step - 1)) % mod;
    }

    private static double EPS = 1e-7;
    private static ArrayList<ArrayList<Integer>> list = new ArrayList<>();
    private static boolean[] used;
    private static int[] a;
    private static boolean flag = false;

    static void solve() throws IOException {
        int n = readInt();
        int m = readInt();
        for (int i = 0; i < n; i++) {
            list.add(new ArrayList<Integer>());
        }
        for (int i = 0; i < m; i++) {
            int from = readInt()-1;
            int to = readInt()-1;
            list.get(from).add(to);
            list.get(to).add(from);
        }
        a = new int[n];
        used = new boolean[n];
        for (int i = 0; i < n; i++) {
            if (flag) {
                System.out.println(-1);
                return;
            }
            if (!used[i]) dfs(i, 1);
        }
        int count1 = 0;
        int count2 = 0;
        HashSet<Integer> set1 = new HashSet<>();
        HashSet<Integer> set2 = new HashSet<>();
        for (int i = 0; i < n; i++) {
            if(a[i] == 1){
                set1.add(i+1);
            }
            if(a[i] == 2)set2.add(i+1);
        }
        out.println(set1.size());
        for(int x : set1){
            out.print(x + " ");
        }
        out.println();
        out.println(set2.size());
        for(int x : set2){
            out.print(x + " ");
        }

    }

    private static void dfs(int i, int newColor) {
        if (flag) return;
        used[i] = true;
        a[i] = newColor;
        for (int x : list.get(i)) {
            if (a[x] == newColor) {
                flag = true;
                return;
            } else {
                if (!used[x] && newColor == 1) dfs(x, 2);
                else if (!used[x] && newColor == 2) dfs(x, 1);
            }
        }
    }

}