import java.io.*;
import java.util.InputMismatchException;

public class Cf1805D {
    private static InputReader in = new InputReader(System.in);
    private static OutputWriter out = new OutputWriter(System.out);

    private static void solve() throws Exception{
        int n = in.readInt();
        int k = in.readInt();
        int a = in.readInt();
        int b = in.readInt();
        int c = in.readInt();
        int d = in.readInt();
        boolean[]  flags = new boolean[n+1];
        flags[a] = true;
        flags[b] = true;
        flags[c] = true;
        flags[d] = true;
        if((k<n+1)||(n<5)){
            out.println(-1);
            return;
        }
        String base1 = "";
        for(int i=1; i<=n; ++i){
            if(flags[i]){
                continue;
            }
            flags[i] = true;
            base1 += (i);
            break;
        }
        String base = "";
        for(int i=1; i<=n; ++i){
            if(flags[i]){
                continue;
            }
            base += (i+" ");
        }
        out.println(a+" "+d+" "+base1+" "+c+" "+base+b);
        out.println(c+" "+base+b+" "+base1+" "+a+" "+d);

    }

    public static void main(String[] args) throws Exception {
        solve();
        out.close();
    }

    private static class InputReader {
        private InputStream stream;
        private byte[] buffer;
        private int currentIndex;
        private int bytesRead;

        public InputReader(InputStream stream) {
            this.stream = stream;
            buffer = new byte[131072];
        }

        public InputReader(InputStream stream, int bufferSize) {
            this.stream = stream;
            buffer = new byte[bufferSize];
        }

        private int read() throws IOException {
            if (currentIndex >= bytesRead) {
                currentIndex = 0;
                bytesRead = stream.read(buffer);
                if (bytesRead <= 0) {
                    return -1;
                }
            }
            return buffer[currentIndex++];
        }

        public String readString() throws IOException {
            int c = read();
            while (!isPrintable(c)) {
                c = read();
            }
            StringBuilder result = new StringBuilder();
            do {
                result.appendCodePoint(c);
                c = read();
            } while (isPrintable(c));
            return result.toString();
        }

        public int readInt() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            int result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public long readLong() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            long result = 0;
            do {
                if ((c < '0') || (c > '9')) {
                    throw new InputMismatchException();
                }
                result *= 10;
                result += (c - '0');
                c = read();
            } while (isPrintable(c));
            return sign * result;
        }

        public double readDouble() throws Exception {
            int c = read();
            int sign = 1;
            while (!isPrintable(c)) {
                c = read();
            }
            if (c == '-') {
                sign = -1;
                c = read();
            }
            boolean fraction = false;
            double multiplier = 1;
            double result = 0;
            do {
                if ((c == 'e') || (c == 'E')) {
                    return sign * result * Math.pow(10, readInt());
                }
                if ((c < '0') || (c > '9')) {
                    if ((c == '.') && (!fraction)) {
                        fraction = true;
                        c = read();
                        continue;
                    }
                    throw new InputMismatchException();
                }
                if (fraction) {
                    multiplier /= 10;
                    result += (c - '0') * multiplier;
                    c = read();
                } else {
                    result *= 10;
                    result += (c - '0');
                    c = read();
                }
            } while (isPrintable(c));
            return sign * result;
        }

        private boolean isPrintable(int c) {
            return ((c > 32) && (c < 127));
        }
    }

    private static class OutputWriter {
        private 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 println(Object... objects) {
            print(objects);
            writer.println();
        }

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

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


// بسم الله الرحمن الرحيم :))

import java.io.*;
import java.util.HashSet;
import java.util.StringTokenizer;

public class C {

    public static void main (String [] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt() , k = sc.nextInt();
        int a = sc.nextInt() , b = sc.nextInt() , c = sc.nextInt() , d = sc.nextInt();
        if(k<n+4)
        	System.out.println(-1);
        else
        {
        	HashSet<Integer> taken = new 	HashSet<Integer>();
        	int aa [] = new int[n];
        	int cc [] = new int[n];

        	aa[n-1] = b;
        	aa[n-2] = d;
        	cc[n-1] = d;
        	cc[n-2] = b;
        	aa[0] = a;
        	aa[1] = c;
        	cc[0] = c;
        	cc[1] = a;
        	for(int i = 2 ; i < n-2 ; ++i)
        		for(int j = 1 ; ; ++j)
        			if(!taken.contains(j) && j!=a && j!=b && j!= c && j!=d)
        			{
        				taken.add(j);
        				aa[i] = j;
        				break;
        			}

        	for(int i =2 ; i<n-2 ; ++i)
        		cc[i] = aa[i];

        	for(int i =0 ; i < n ; ++i)
        		System.out.print(aa[i]+" ");
        	System.out.println();
        	for(int i =0 ; i < n ; ++i)
        		System.out.print(cc[i]+" ");
        }
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public Scanner(FileReader r){	br = new BufferedReader(r);}

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

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

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public boolean ready() throws IOException {return br.ready();}

    }

}


// بسم الله الرحمن الرحيم :))

import java.io.*;
import java.util.HashSet;
import java.util.StringTokenizer;

public class C {

    public static void main (String [] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt() , k = sc.nextInt();
        int a = sc.nextInt() , b = sc.nextInt() , c = sc.nextInt() , d = sc.nextInt();
        if(k<(n-1)+4)
        	System.out.println(-1);
        else
        {
        	HashSet<Integer> taken = new 	HashSet<Integer>();
        	int aa [] = new int[n];
        	int cc [] = new int[n];

        	aa[n-1] = b;
        	aa[n-2] = d;
        	cc[n-1] = d;
        	cc[n-2] = b;
        	aa[0] = a;
        	aa[1] = c;
        	cc[0] = c;
        	cc[1] = a;
        	for(int i = 2 ; i < n-2 ; ++i)
        		for(int j = 1 ; ; ++j)
        			if(!taken.contains(j) && j!=a && j!=b && j!= c && j!=d)
        			{
        				taken.add(j);
        				aa[i] = j;
        				break;
        			}

        	for(int i =2 ; i<n-2 ; ++i)
        		cc[i] = aa[i];

        	for(int i =0 ; i < n ; ++i)
        		System.out.print(aa[i]+" ");
        	System.out.println();
        	for(int i =0 ; i < n ; ++i)
        		System.out.print(cc[i]+" ");
        }
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public Scanner(FileReader r){	br = new BufferedReader(r);}

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

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

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public boolean ready() throws IOException {return br.ready();}

    }

}


import java.io.*;
        import java.util.HashSet;
        import java.util.StringTokenizer;

public class codeforces_350_D{

    public static void main (String [] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt() , k = sc.nextInt();
        int a = sc.nextInt()  , b = sc.nextInt() , c = sc.nextInt() , d = sc.nextInt();

        if(k < n+1)
            {
                System.out.println(-1); return;
            }

        int aa [] = new int[n] , cc [] = new int[n];
        aa[0] = a;
        aa[1] = c;
        aa[n-2] = d;
        aa[n-1] = b;

        cc[0] = c;
        cc[1] = a;
        cc[n-2]=b;
        cc[n-1]=d;

        HashSet<Integer> taken = new HashSet<Integer> ();
        taken.add(a);
        taken.add(b);
        taken.add(c);
        taken.add(d);

        for(int i =2 ; i<n-2 ; ++i)
            for(int j = 1 ; ; ++j)
                if(!taken.contains(j))
                {
                    taken.add(j);
                    aa[i] = j;
                    cc[i] = j;
                    break;
                }

        for(int i = 0 ; i < n ; ++i)
            if(i==0)
                System.out.print(aa[i]);
            else System.out.print(" "+aa[i]);

        System.out.println();

        for(int i = 0 ; i < n ; ++i)
            if(i==0)
                System.out.print(cc[i]);
            else System.out.print(" "+cc[i]);

    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public Scanner(FileReader r){	br = new BufferedReader(r);}

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

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

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public boolean ready() throws IOException {return br.ready();}

    }

}


import java.io.*;
        import java.util.HashSet;
        import java.util.StringTokenizer;

public class codeforces_350_D{

    public static void main (String [] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt() , k = sc.nextInt();
        int a = sc.nextInt()  , b = sc.nextInt() , c = sc.nextInt() , d = sc.nextInt();

        if(k < n+1 || n == 4)
            {
                System.out.println(-1); return;
            }

        int aa [] = new int[n] , cc [] = new int[n];
        aa[0] = a;
        aa[1] = c;
        aa[n-2] = d;
        aa[n-1] = b;

        cc[0] = c;
        cc[1] = a;
        cc[n-2]=b;
        cc[n-1]=d;

        HashSet<Integer> taken = new HashSet<Integer> ();
        taken.add(a);
        taken.add(b);
        taken.add(c);
        taken.add(d);

        for(int i =2 ; i<n-2 ; ++i)
            for(int j = 1 ; ; ++j)
                if(!taken.contains(j))
                {
                    taken.add(j);
                    aa[i] = j;
                    cc[i] = j;
                    break;
                }

        for(int i = 0 ; i < n ; ++i)
            if(i==0)
                System.out.print(aa[i]);
            else System.out.print(" "+aa[i]);

        System.out.println();

        for(int i = 0 ; i < n ; ++i)
            if(i==0)
                System.out.print(cc[i]);
            else System.out.print(" "+cc[i]);

    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public Scanner(FileReader r){	br = new BufferedReader(r);}

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

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

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public boolean ready() throws IOException {return br.ready();}

    }

}


// بسم الله الرحمن الرحيم :))

import java.io.*;
import java.util.HashSet;
import java.util.StringTokenizer;

public class C {

    public static void main (String [] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt() , k = sc.nextInt();
        int a = sc.nextInt() , b = sc.nextInt() , c = sc.nextInt() , d = sc.nextInt();
        if(k<(n-1)+3)
        	System.out.println(-1);
        else
        {
        	HashSet<Integer> taken = new 	HashSet<Integer>();
        	int aa [] = new int[n];
        	int cc [] = new int[n];

        	aa[n-1] = b;
        	aa[n-2] = d;
        	cc[n-1] = d;
        	cc[n-2] = b;
        	aa[0] = a;
        	aa[1] = c;
        	cc[0] = c;
        	cc[1] = a;
        	for(int i = 2 ; i < n-2 ; ++i)
        		for(int j = 1 ; ; ++j)
        			if(!taken.contains(j) && j!=a && j!=b && j!= c && j!=d)
        			{
        				taken.add(j);
        				aa[i] = j;
        				break;
        			}

        	for(int i =2 ; i<n-2 ; ++i)
        		cc[i] = aa[i];

        	for(int i =0 ; i < n ; ++i)
        		System.out.print(aa[i]+" ");
        	System.out.println();
        	for(int i =0 ; i < n ; ++i)
        		System.out.print(cc[i]+" ");
        }
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public Scanner(FileReader r){	br = new BufferedReader(r);}

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

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

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public boolean ready() throws IOException {return br.ready();}

    }

}


import java.io.*;
import java.util.HashSet;
import java.util.StringTokenizer;

public class C {

    public static void main (String [] args) throws Exception
    {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt() , k = sc.nextInt();
        int a = sc.nextInt() , b = sc.nextInt() , c = sc.nextInt() , d = sc.nextInt();
        if(k<n+4)
        	System.out.println(-1);
        else
        {
        	HashSet<Integer> taken = new 	HashSet<Integer>();
        	int aa [] = new int[n];
        	int cc [] = new int[n];

        	aa[n-1] = b;
        	aa[n-2] = d;
        	cc[n-1] = d;
        	cc[n-2] = a;
        	aa[0] = a;
        	aa[1] = c;
        	cc[0] = c;
        	cc[1] = a;
        	for(int i = 2 ; i < n-2 ; ++i)
        		for(int j = 1 ; ; ++j)
        			if(!taken.contains(j) && j!=a && j!=b && j!= c && j!=d)
        			{
        				taken.add(j);
        				aa[i] = j;
        				break;
        			}

        	for(int i =2 ; i<n-2 ; ++i)
        		cc[i] = aa[i];

        	for(int i =0 ; i < n ; ++i)
        		System.out.print(aa[i]+" ");
        	System.out.println();
        	for(int i =0 ; i < n ; ++i)
        		System.out.print(cc[i]+" ");
        }
    }

    static class Scanner
    {
        StringTokenizer st;
        BufferedReader br;

        public Scanner(InputStream s){	br = new BufferedReader(new InputStreamReader(s));}

        public Scanner(FileReader r){	br = new BufferedReader(r);}

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

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

        public long nextLong() throws IOException {return Long.parseLong(next());}

        public String nextLine() throws IOException {return br.readLine();}

        public double nextDouble() throws IOException
        {
            String x = next();
            StringBuilder sb = new StringBuilder("0");
            double res = 0, f = 1;
            boolean dec = false, neg = false;
            int start = 0;
            if(x.charAt(0) == '-')
            {
                neg = true;
                start++;
            }
            for(int i = start; i < x.length(); i++)
                if(x.charAt(i) == '.')
                {
                    res = Long.parseLong(sb.toString());
                    sb = new StringBuilder("0");
                    dec = true;
                }
                else
                {
                    sb.append(x.charAt(i));
                    if(dec)
                        f *= 10;
                }
            res += Long.parseLong(sb.toString()) / f;
            return res * (neg?-1:1);
        }

        public boolean ready() throws IOException {return br.ready();}

    }

}


import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.Arrays;
import java.util.HashSet;
import java.util.Set;
import java.util.StringTokenizer;

public class D {

    private static final BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
    private static StringTokenizer tok = null;

    private static String nextToken() throws IOException {
        if (tok == null || !tok.hasMoreTokens()) {
            tok = new StringTokenizer(in.readLine());
        }

        return tok.nextToken();
    }

    private static int nextInt() throws IOException {
        return Integer.parseInt(nextToken());
    }

    public static void main(String[] args) throws IOException {
	    int n = nextInt();
        int k = nextInt();
        int a = nextInt();
        int b = nextInt();
        int c = nextInt();
        int d = nextInt();

        if (k < n + 1 || n == 4) {
            System.out.println(-1);
            return;
        }

        int[] perm = new int[n];
        perm[0] = a;
        perm[n - 1] = b;
        perm[1] = c;
        perm[n - 2] = d;

        Set<Integer> unused = new HashSet<Integer>();
        for (int i = 1; i <= n; i++) {
            unused.add(i);
        }
        unused.removeAll(Arrays.asList(a, b, c, d));

        int i = 2;
        for (int j : unused) {
            perm[i++] = j;
        }

        for (int j = 0; j < n; j++) {
            System.out.print(perm[j] + " ");
        }
        System.out.println();

        System.out.printf("%d %d ", perm[1], perm[0]);
        for (int j = 2; j < n - 2; j++) {
            System.out.print(perm[j] + " ");
        }
        System.out.printf("%d %d ", perm[n - 1], perm[n - 2]);
    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;

/* Codeforces Round #351 (VK Cup 2016 Round 3, Div. 2 Edition)
 *  Bear and Two Paths
 * @author : raghumdani
*/

public class Problem_673_D {
	public static final int testCases = 1;

	public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        for (int t = 1; t <= testCases; ++t) {
            Problem_673_D solver = new Problem_673_D ();
            solver.solve(t, in, out);
        }
        out.close();
    }

	int[] used;
	int[] next;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt(), k = in.nextInt();
        int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), d = in.nextInt();
        a--; b--; c--; d--;
        used = new int[n];
        next = new int[n];

        if(n == 4) {
            out.println(-1);
            return;
        }
        if(k < n + 1) {
            out.println(-1);
            return;
        }

        used[a] = used[b] = used[c] = used[d] = 1;
        int last = unused(n), x;
        int st = last;
        while((x = unused(n)) != -1) {
            next[last] = x;
            last = x;
        }

        out.print((a + 1) + " " + (c + 1));
        int cur = st;
        while(true) {
            out.print(" " + (cur + 1));
            if(cur == last) break;
            cur = next[cur];
        }
        out.println(" " + (d + 1) + " " + (b + 1));

        out.print((c + 1) + " " + (a + 1));

        cur = st;
        while(true) {
            out.print(" " + (cur + 1));
            if(cur == last) break;
            cur = next[cur];
        }

        out.println(" " + (b + 1) + " " + (d + 1));
        return;
    }

    private int unused(int n) {
        for(int i = 0; i < n; ++i) {
            if(used[i] == 0) {
                used[i] = 1;
                return i;
            }
        }
        return -1;
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.PrintWriter;
import java.util.StringTokenizer;
import java.io.BufferedReader;

/* Codeforces Round #351 (VK Cup 2016 Round 3, Div. 2 Edition)
 *  Bear and Two Paths
 * @author : raghumdani
*/

public class Problem_673_D {
	public static final int testCases = 1;

	public static void main(String[] args) {
        InputStream inputStream = System.in;
        OutputStream outputStream = System.out;
        InputReader in = new InputReader(inputStream);
        PrintWriter out = new PrintWriter(outputStream);

        for (int t = 1; t <= testCases; ++t) {
            Problem_673_D solver = new Problem_673_D ();
            solver.solve(t, in, out);
        }
        out.close();
    }

	int[] next;

    public void solve(int testNumber, InputReader in, PrintWriter out) {
        int n = in.nextInt(), k = in.nextInt();
        int a = in.nextInt(), b = in.nextInt(), c = in.nextInt(), d = in.nextInt();
        a--; b--; c--; d--;
        next = new int[n];

        if(k == n - 1) {
            out.println(-1);
            return;
        }

        next[a] = d; next[d] = c;
        int last = c;
        for(int i = 0; i < n; ++i) {
            if(i != a && i != b && i != c && i != d) {
                next[last] = i;
                last = i;
            }
        }
        next[last] = b;
        next[b] = a;

        int cur = a;
        while(true) {
            out.print(cur + 1);
            out.print((cur == b)?'\n':' ');
            if(cur == b) break;
            cur = next[cur];
        }
        cur = c;
        while(true) {
            out.print(cur + 1);
            out.print((cur == d) ? '\n':' ');
            if(cur == d) break;
            cur = next[cur];
        }
        return;
    }

    static class InputReader {
        public BufferedReader reader;
        public StringTokenizer tokenizer;

        public InputReader(InputStream stream) {
            reader = new BufferedReader(new InputStreamReader(stream), 32768);
            tokenizer = null;
        }

        public String next() {
            while (tokenizer == null || !tokenizer.hasMoreTokens()) {
                try {
                    tokenizer = new StringTokenizer(reader.readLine());
                } catch (IOException e) {
                    throw new RuntimeException(e);
                }
            }
            return tokenizer.nextToken();
        }

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

    }
}


import java.util.*;
public class D {
	public static void main(String...ed){
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int k = seer.nextInt();
		if(k < n){
			System.out.println("-1"); return;
		}
		int a = seer.nextInt();
		int b = seer.nextInt();
		int c = seer.nextInt();
		int d = seer.nextInt();
		HashSet<Integer> set = new HashSet<>();
		set.add(a); set.add(b); set.add(c); set.add(d);
		int[] res = new int[n];
		res[0] = a; res[n-1] = b;
		res[1] = c; res[2] = d;
		int u = 1;
		for(int i = 3; i < n-1; i++){
			while(set.contains(u)){
				u++;
			}
			res[i] = u;
			u++;
		}
		StringBuilder sb = new StringBuilder();
		for(int n0: res){
			sb.append(n0+" ");
		}
		System.out.println(sb.toString().trim());
		sb = new StringBuilder();
		for(int i = n+1; i >= 2; i--){
			sb.append(res[i%n]+" ");
		}
		System.out.println(sb.toString().trim());
	}
}


import java.util.*;
public class D {
	public static void main(String...ed){
		Scanner seer = new Scanner(System.in);
		int n = seer.nextInt();
		int k = seer.nextInt();
		if(k < n+1 || n == 4){
			System.out.println("-1"); return;
		}
		int a = seer.nextInt();
		int b = seer.nextInt();
		int c = seer.nextInt();
		int d = seer.nextInt();
		HashSet<Integer> set = new HashSet<>();
		set.add(a); set.add(b); set.add(c); set.add(d);
		int[] res = new int[n];
		res[0] = a; res[n-1] = b;
		res[1] = c; res[3] = d;
		int u = 1;
		while(set.contains(u)) u++;
		res[2] = u; u++;
		for(int i = 4; i < n-1; i++){
			while(set.contains(u)) u++;
			res[i] = u; u++;
		}
		StringBuilder sb = new StringBuilder();
		for(int n0: res){
			sb.append(n0+" ");
		}
		System.out.println(sb.toString().trim());
		sb = new StringBuilder();
		sb.append(res[1]+" "+res[0]+" "+res[2]+" ");
		for(int i = n-1; i > 2; i--){
			sb.append(res[i]+" ");
		}
		System.out.println(sb.toString().trim());
	}
}


import java.util.Scanner;

public class Main {
  static int n, k;
  static int a, b, c, d;

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    n = sc.nextInt(); k = sc.nextInt();
    a = sc.nextInt() - 1; b = sc.nextInt() - 1;
    c = sc.nextInt() - 1; d = sc.nextInt() - 1;

    if(n + 1 > k || n == 4){
      System.out.println(-1);
      return;
    }

    int[] mem = new int[n - 4];
    int sp = 0;
    for(int i = 0; i < n; i++){
      if(i != a && i != b && i != c && i != d){
        mem[sp++] = i;
      }
    }

    int[] ans1 = new int[n];
    ans1[0] = a;  ans1[1] = c;
    ans1[n - 2] = d;  ans1[n - 1] = b;
    for(int i = 2; i < n - 2; i++){
      ans1[i] = mem[sp - i + 1];
    }
    int[] ans2 = new int[n];
    ans2[0] = c;  ans2[1] = a;
    ans2[n - 2] = b;  ans2[n - 1] = d;
    for(int i = 2; i < n - 2; i++){
      ans2[i] = mem[sp - i + 1];
    }

    for(int i = 0; i < n; i++){
      System.out.print((ans1[i] + 1) + ((i == n - 1) ? "\n" : " "));
    }
    for(int i = 0; i < n; i++){
      System.out.print((ans2[i] + 1) + ((i == n - 1) ? "\n" : " "));
    }
  }
}


import java.util.Scanner;

public class Main {
  static int n, k;
  static int a, b, c, d;

  public static void main(String[] args){
    Scanner sc = new Scanner(System.in);

    n = sc.nextInt(); k = sc.nextInt();
    a = sc.nextInt() - 1; b = sc.nextInt() - 1;
    c = sc.nextInt() - 1; d = sc.nextInt() - 1;

    if(n + 1 > k){
      System.out.println(-1);
      return;
    }

    int[] mem = new int[n - 4];
    int sp = 0;
    for(int i = 0; i < n; i++){
      if(i != a && i != b && i != c && i != d){
        mem[sp++] = i;
      }
    }

    int[] ans1 = new int[n];
    ans1[0] = a;  ans1[1] = c;
    ans1[n - 2] = d;  ans1[n - 1] = b;
    for(int i = 2; i < n - 2; i++){
      ans1[i] = mem[sp - i + 1];
    }
    int[] ans2 = new int[n];
    ans2[0] = c;  ans2[1] = a;
    ans2[n - 2] = b;  ans2[n - 1] = d;
    for(int i = 2; i < n - 2; i++){
      ans2[i] = mem[sp - i + 1];
    }

    for(int i = 0; i < n; i++){
      System.out.print((ans1[i] + 1) + ((i == n - 1) ? "\n" : " "));
    }
    for(int i = 0; i < n; i++){
      System.out.print((ans2[i] + 1) + ((i == n - 1) ? "\n" : " "));
    }
  }
}


import java.util.*;
import java.io.*;
public class D673 {
public static void main(String[] args) throws IOException {
	FS input = new FS(System.in);
	PrintWriter out = new PrintWriter(System.out);
	int n = input.nextInt(), k = input.nextInt();
	int a = input.nextInt()-1, b = input.nextInt()-1, c = input.nextInt()-1, d = input.nextInt()-1;
	if(n == 4 || k <= n) out.println(-1);
	else
	{
		ArrayList<Integer> others = new ArrayList<Integer>();
		for(int i = 0; i<n; i++)
		{
			if(i == a || i == b || i == c || i == d) continue;
			others.add(i+1);
		}
		out.print(a+1+" "+(c+1)+" ");
		for(int x : others) out.print(x+" ");
		out.println((d+1)+" "+(b+1));
		out.print(c+1+" "+(a+1)+" ");
		for(int x : others) out.print(x+" ");
		out.println(b+1+" "+(d+1));
	}
	out.close();
}

static class FS {
	BufferedReader br;
	StringTokenizer st;

	FS(InputStream in) {
		br = new BufferedReader(new InputStreamReader(in));
	}

	String next() throws IOException {
		while (st == null || !st.hasMoreTokens())
			st = new StringTokenizer(br.readLine());
		return st.nextToken();
	}

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

	long nextLong() throws IOException {
		return Long.parseLong(next());
	}

	double nextDouble() throws IOException {
		return Double.parseDouble(next());
	}
}
}


//package acc;
import java.util.*;
import java.io.*;
import java.math.BigInteger;
   public  class ACC {
//************Main*****************//

         public static void main(String[] args) throws IOException
			 {
             //   PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
              //  Scanner in=new Scanner (System.in);
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(inputStream);
                PrintWriter out = new PrintWriter(outputStream);
                int n=in.nextInt(),e=in.nextInt(),a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),d=in.nextInt();
                if(e<n+1||n<6) {
                    out.print(-1);
                    out.close();
                }
                else{
                    List<Integer> l=new ArrayList<>();
                    int point1=0,point2=0;

                    l.add(a);
                    for(int i=1;i<=n;i++){
                        if(i==a||i==b||i==c||i==d) continue;
                        if(point1==0){
                            point1=i;
                            continue;
                        }
                        if(point2==0){
                            point2=i;
                            continue;
                        }
                        l.add(i);
                    }
                    l.add(c);
                    for(int i=0;i<l.size();i++){
                        out.print(l.get(i)+" ");
                    }
                    out.println(point2+" "+d+" "+point1+" "+b);
                    for(int i=l.size()-1;i>=0;i--){
                        out.print(l.get(i)+" ");
                    }
                    out.print(point1+" "+b+" "+point2+" "+d);
                }

                out.close();
         }

   }
    class Pair implements Comparable<Pair>{
    int x,y;
    public  Pair(int X,int Y){
        super();
x=X;
y=Y;
}
    @Override
      public int compareTo(Pair p){
          if((x)==(p.x)) return Integer.compare((y), (p.y));
       return Integer.compare((x), (p.x));
}
  }

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong(){
        return Long.parseLong(next());
    }
}


//package acc;
import java.util.*;
import java.io.*;
import java.math.BigInteger;
   public  class ACC {
//************Main*****************//

         public static void main(String[] args) throws IOException
			 {
             //   PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
              //  Scanner in=new Scanner (System.in);
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(inputStream);
                PrintWriter out = new PrintWriter(outputStream);
                int n=in.nextInt(),e=in.nextInt(),a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),d=in.nextInt();
                if(e<n) {
                    out.print(-1);
                    out.close();
                }
                else{
                    List<Integer> l=new ArrayList<>();
                    l.add(a);
                    for(int i=1;i<=n;i++){
                        if(i==a||i==b||i==c||i==d) continue;
                        l.add(i);
                    }
                    l.add(c);
                    for(int i=0;i<l.size();i++){
                        out.print(l.get(i)+" ");
                    }
                    out.println(d+" "+b);
                    for(int i=l.size()-1;i>=0;i--){
                        out.print(l.get(i)+" ");
                    }
                    out.print(b+" "+d);
                }

                out.close();
         }

   }
    class Pair implements Comparable<Pair>{
    int x,y;
    public  Pair(int X,int Y){
        super();
x=X;
y=Y;
}
    @Override
      public int compareTo(Pair p){
          if((x)==(p.x)) return Integer.compare((y), (p.y));
       return Integer.compare((x), (p.x));
}
  }

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong(){
        return Long.parseLong(next());
    }
}


//package acc;
import java.util.*;
import java.io.*;
import java.math.BigInteger;
   public  class ACC {
//************Main*****************//

         public static void main(String[] args) throws IOException
			 {
             //   PrintWriter out=new PrintWriter(new OutputStreamWriter(System.out));
              //  Scanner in=new Scanner (System.in);
                InputStream inputStream = System.in;
                OutputStream outputStream = System.out;
                InputReader in = new InputReader(inputStream);
                PrintWriter out = new PrintWriter(outputStream);
                int n=in.nextInt(),e=in.nextInt(),a=in.nextInt(),b=in.nextInt(),c=in.nextInt(),d=in.nextInt();
                if(e<n+1||n<5) {
                    out.print(-1);
                    out.close();
                }

                else{

                    List<Integer> l=new ArrayList<>();
                    int point1=0,point2=0;

                    l.add(a);
                    for(int i=1;i<=n;i++){
                        if(i==a||i==b||i==c||i==d) continue;
                        if(point1==0){
                            point1=i;
                            continue;
                        }
                        if(point2==0){
                            point2=i;
                            continue;
                        }
                        l.add(i);
                    }
                    if(n==5){
                        out.println(a+" "+c+" "+point1+" "+d+" "+b);

                        out.print(c+" "+a+" "+point1+" "+b+" "+d);

                    }
                    else{
                    l.add(c);
                    for(int i=0;i<l.size();i++){
                        out.print(l.get(i)+" ");
                    }
                    out.println(point2+" "+d+" "+point1+" "+b);
                    for(int i=l.size()-1;i>=0;i--){
                        out.print(l.get(i)+" ");
                    }
                    out.print(point1+" "+b+" "+point2+" "+d);
                }
                }

                out.close();
         }

   }
    class Pair implements Comparable<Pair>{
    int x,y;
    public  Pair(int X,int Y){
        super();
x=X;
y=Y;
}
    @Override
      public int compareTo(Pair p){
          if((x)==(p.x)) return Integer.compare((y), (p.y));
       return Integer.compare((x), (p.x));
}
  }

class InputReader {
    private BufferedReader reader;
    private StringTokenizer tokenizer;

    public InputReader(InputStream stream) {
        reader = new BufferedReader(new InputStreamReader(stream));
        tokenizer = null;
    }

    public String next() {
        while (tokenizer == null || !tokenizer.hasMoreTokens()) {
            try {
                tokenizer = new StringTokenizer(reader.readLine());
            } catch (IOException e) {
                throw new RuntimeException(e);
            }
        }
        return tokenizer.nextToken();
    }

    public int nextInt() {
        return Integer.parseInt(next());
    }
    public long nextLong(){
        return Long.parseLong(next());
    }
}


import java.io.BufferedReader;
import java.io.InputStreamReader;
import java.io.PrintWriter;

public class BearAndTwoPaths {
    public static void main(String[] args) throws Exception {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        PrintWriter pw = new PrintWriter(System.out);
        StringBuilder sb = new StringBuilder("-1");
        String[] inData = br.readLine().split(" ");
        int n = Integer.parseInt(inData[0]);
        int k = Integer.parseInt(inData[1]);
        inData = br.readLine().split(" ");
        int a = Integer.parseInt(inData[0]);
        int b = Integer.parseInt(inData[1]);
        int c = Integer.parseInt(inData[2]);
        int d = Integer.parseInt(inData[3]);
        int[] arr;
        if (n > 4 && k > n) {
            arr = new int[n - 4];
            sb.delete(0, sb.length());
            for (int i = 0, j = 1; i <= n && j <= n; j++) {
                if (a != j && b != j && c != j && d != j) {
                    arr[i] = j;
                    i++;
                }
            }
            sb.append(a + " " + c + " ");
            for (int i = 0; i < n - 4; i++) {
                sb.append(arr[i] + " ");
            }
            sb.append(d + " " + b + "\n");
            sb.append(c + " " + a + " ");
            for (int i = 0; i < n - 4; i++) {
                sb.append(arr[i] + " ");
            }
            sb.append(b + " " + d + "\n");
        }
        pw.print(sb);
        pw.close();
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String ss = sc.nextLine();
        Integer []in1 = Arrays.stream(ss.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);
        String s = sc.nextLine();
        Integer []in = Arrays.stream(s.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);

        f(in1[0], in1[1], in[0], in[1], in[2], in[3]);
    }

    static void f(int n, int k, int a, int b, int c, int d) {
        if(k == n - 1) {
            System.out.println("-1");
            return;
        }

        if(a != c && b != d) {
            int[] path1 = new int[n];
            boolean [] path1Map = new boolean[n + 1];
            path1[0] = a;
            path1[n - 1] = b;
            path1[1] = d;
            path1[2] = c;
            path1Map[a] = true;
            path1Map[b] = true;
            path1Map[c] = true;
            path1Map[d] = true;
            for(int i = 1, j = 3; i <= n; i++) {
                if(!path1Map[i]) {
                    path1Map[i]=true;
                    path1[j++] = i;
                }
            }

            int[]path2 = new int[n];
            System.arraycopy(path1, 0, path2, 0, n);
            path2[0] = c;

            for(int i = 1; i < n - 3; i++) {
                path2[i] = path2[i + 2];
            }
             path2[n - 1] = d;
            path2[n - 2] = a;
            path2[n - 3] = b;

            System.out.println(Arrays.toString(path1));
            System.out.println(Arrays.toString(path2));
        } else {
            System.out.println("unexpected case");
        }
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String ss = sc.nextLine();
        Integer []in1 = Arrays.stream(ss.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);
        String s = sc.nextLine();
        Integer []in = Arrays.stream(s.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);

        f(in1[0], in1[1], in[0], in[1], in[2], in[3]);
    }

    static void f(int n, int k, int a, int b, int c, int d) {
    if(k == n - 1 || n <= 4) {
            System.out.println("-1");
            return;
        }

        if(a != c && b != d) {
            int[] commonPath = new int[n - 4];

            for(int i = 1, j = 0; j < n - 4; i++) {
                if(i != a && i != b && i != c && i != d)
                    commonPath[j++] =  i;
            }

            int[] path1 = new int[n];
            path1[0] = a;
            path1[n - 1] = b;
            path1[1] = c;
            path1[n - 2] = d;

            for(int j = 2, i = 0; j < n - 2; j++) {
                path1[j] = commonPath[i++];
            }

            int[]path2 = new int[n];
            System.arraycopy(path1, 0, path2, 0, n);
            path2[0] = c;
              path2[1] = a;
           path2[n - 2] = b;
             path2[n - 1] = d;
            for(int i = 0; i < path1.length; i++) {
                if(i != path1.length - 1)
                 System.out.print(path1[i] + " "); else
                 System.out.print(path1[i]);
            }
           System.out.println();
            for(int i = 0; i < path2.length; i++) {
                if(i != path2.length - 1)
                 System.out.print(path2[i] + " "); else
                 System.out.print(path2[i]);
            }

        } else {
            System.out.println("unexpected case");
        }
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String ss = sc.nextLine();
        Integer []in1 = Arrays.stream(s.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);
        String s = sc.nextLine();
        Integer []in = Arrays.stream(s.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);

        f(in1[0], in1[1], in[0], in[1], in[2], in[3]);
    }

    static void f(int n, int k, int a, int b, int c, int d) {
        if(k == n - 1) {
            System.out.println("-1");
            return;
        }

        if(a != c && b != d) {
            int[] path1 = new int[n];
            boolean [] path1Map = new boolean[n + 1];
            path1[0] = a;
            path1[n - 1] = b;
            path1[1] = d;
            path1[2] = c;
            path1Map[a] = true;
            path1Map[b] = true;
            path1Map[c] = true;
            path1Map[d] = true;
            for(int i = 1, j = 3; i <= n; i++) {
                if(!path1Map[i]) {
                    path1Map[i]=true;
                    path1[j++] = i;
                }
            }

            int[]path2 = new int[n];
            System.arraycopy(path1, 0, path2, 0, n);
            path2[0] = c;

            for(int i = 1; i < n - 3; i++) {
                path2[i] = path2[i + 2];
            }
             path2[n - 1] = d;
            path2[n - 2] = a;
            path2[n - 3] = b;

            System.out.println(Arrays.toString(path1));
            System.out.println(Arrays.toString(path2));
        } else {
            System.out.println("unexpected case");
        }
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String ss = sc.nextLine();
        Integer []in1 = Arrays.stream(ss.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);
        String s = sc.nextLine();
        Integer []in = Arrays.stream(s.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);

        f(in1[0], in1[1], in[0], in[1], in[2], in[3]);
    }

    static void f(int n, int k, int a, int b, int c, int d) {
        if(k == n - 1) {
            System.out.println("-1");
            return;
        }

        if(a != c && b != d) {
            int[] path1 = new int[n];
            boolean [] path1Map = new boolean[n + 1];
            path1[0] = a;
            path1[n - 1] = b;
            path1[1] = d;
            path1[2] = c;
            path1Map[a] = true;
            path1Map[b] = true;
            path1Map[c] = true;
            path1Map[d] = true;
            for(int i = 1, j = 3; i <= n; i++) {
                if(!path1Map[i]) {
                    path1Map[i]=true;
                    path1[j++] = i;
                }
            }

            int[]path2 = new int[n];
            System.arraycopy(path1, 0, path2, 0, n);
            path2[0] = c;

            for(int i = 1; i < n - 3; i++) {
                path2[i] = path2[i + 2];
            }
             path2[n - 1] = d;
            path2[n - 2] = a;
            path2[n - 3] = b;

            for(int i = 0; i < path1.length; i++) {
                if(i != path1.length - 1)
                 System.out.print(path1[i] + " "); else
                 System.out.print(path1[i]);
            }
           System.out.println();
            for(int i = 0; i < path2.length; i++) {
                if(i != path2.length - 1)
                 System.out.print(path2[i] + " "); else
                 System.out.print(path2[i]);
            }
        } else {
            System.out.println("unexpected case");
        }
    }
}


import java.util.*;

public class Main {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String ss = sc.nextLine();
        Integer []in1 = Arrays.stream(ss.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);
        String s = sc.nextLine();
        Integer []in = Arrays.stream(s.split(" ")).map(Integer::parseInt).toArray(Integer[]::new);

        f(in1[0], in1[1], in[0], in[1], in[2], in[3]);
    }

    static void f(int n, int k, int a, int b, int c, int d) {
    if(k == n - 1 || n <= 4 || k == n) {
            System.out.println("-1");
            return;
        }

        if(a != c && b != d) {
            int[] commonPath = new int[n - 4];

            for(int i = 1, j = 0; j < n - 4; i++) {
                if(i != a && i != b && i != c && i != d)
                    commonPath[j++] =  i;
            }

            int[] path1 = new int[n];
            path1[0] = a;
            path1[n - 1] = b;
            path1[1] = c;
            path1[n - 2] = d;

            for(int j = 2, i = 0; j < n - 2; j++) {
                path1[j] = commonPath[i++];
            }

            int[]path2 = new int[n];
            System.arraycopy(path1, 0, path2, 0, n);
            path2[0] = c;
              path2[1] = a;
           path2[n - 2] = b;
             path2[n - 1] = d;
            for(int i = 0; i < path1.length; i++) {
                if(i != path1.length - 1)
                 System.out.print(path1[i] + " "); else
                 System.out.print(path1[i]);
            }
           System.out.println();
            for(int i = 0; i < path2.length; i++) {
                if(i != path2.length - 1)
                 System.out.print(path2[i] + " "); else
                 System.out.print(path2[i]);
            }

        } else {
            System.out.println("unexpected case");
        }
    }
}


import java.util.Scanner;

/**
 * May 7, 2016 | 4:00:51 PM
 *

 * Description
 *
 *

 *
 * @author Essiennta Emmanuel (colourfulemmanuel@gmail.com)
 */
public class ProblemD{

    void solve(int n, int k, int a, int b, int c, int d) {
        if (n == 4) {
            System.out.println("-1");
            return;
        }
        if (k < n + 1) {
            System.out.println("-1");
            return;
        }

        StringBuilder sb = new StringBuilder();
        sb.append(a).append(' ').append(c).append(' ');
        for (int i = 1; i <= n; i++) {
            if (i == a || i == b || i == c || i == d)
                continue;
            sb.append(i).append(' ');
        }
        sb.append(d).append(' ').append(b);

        sb.append('\n');
        sb.append(c).append(' ').append(a).append(' ');
        for (int i = 1; i <= n; i++) {
            if (i == a || i == b || i == c || i == d)
                continue;
            sb.append(i).append(' ');
        }
        sb.append(b).append(' ').append(d);
        System.out.println(sb);
    }

    public static void main(String[] args){
        try (Scanner sc = new Scanner(System.in)) {
            int n = sc.nextInt();
            int k = sc.nextInt();
            int a = sc.nextInt();
            int b = sc.nextInt();
            int c = sc.nextInt();
            int d = sc.nextInt();
            new ProblemD().solve(n, k, a, b, c, d);
        }
    }
}


import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class BearAndTwoPaths {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        if (n == 4 || k < n + 1) {
            System.out.println(-1);
        }
        else {
            StringBuffer res = new StringBuffer();
            StringBuffer res2 = new StringBuffer();
            System.out.print(a + " ");
            System.out.print(c + " ");

            boolean firstime = true;
            for (int i = 1; i <= n; ++i) {
                if (i != a && i != b && i != c && i != d) {
                    if (firstime) {
                        firstime = false;
                    }
                    else {
                        res2.append(i);
                        res2.append(' ');
                    }
                    res.append(i);
                    res.append(' ');
                }
            }
            System.out.print(res);
            System.out.print(d + " ");
            System.out.println(b);

            System.out.print(c + " ");
            System.out.print(a + " ");
            System.out.print(res);
            System.out.print(b + " ");
            System.out.println(d);
        }

    }
}


import java.util.LinkedList;
import java.util.List;
import java.util.Scanner;

public class BearAndTwoPaths {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        if (n == 4 || k < n + 2) {
            System.out.println(-1);
        }
        else {
            StringBuffer res = new StringBuffer();
            StringBuffer res2 = new StringBuffer();
            System.out.print(a + " ");
            System.out.print(c + " ");

            boolean firstime = true;
            for (int i = 1; i <= n; ++i) {
                if (i != a && i != b && i != c && i != d) {
                    if (firstime) {
                        firstime = false;
                    }
                    else {
                        res2.append(i);
                        res2.append(' ');
                    }
                    res.append(i);
                    res.append(' ');
                }
            }
            System.out.print(res);
            System.out.print(d + " ");
            System.out.println(b);

            System.out.print(c + " ");
            for (int i = 1; i <= n; ++i) {
                if (i != a && i != b && i != c && i != d) {
                    System.out.print(i + " ");
                    break;
                }
            }
            System.out.print(a + " ");
            System.out.print(res2);
            System.out.print(b + " ");
            System.out.println(d);
        }

    }
}


import java.util.Scanner;

public class BearAndTwoPaths {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        int k = sc.nextInt();

        int a = sc.nextInt();
        int b = sc.nextInt();
        int c = sc.nextInt();
        int d = sc.nextInt();

        if (n == 4 || k < n + 1) {
            System.out.println(-1);
        }
        else {
            StringBuffer res = new StringBuffer();
            System.out.print(a + " ");
            System.out.print(c + " ");
            for (int i = 1; i <= n; ++i) {
                if (i != a && i != b && i != c && i != d) {
                    res.append(i);
                    res.append(' ');
                }
            }
            System.out.print(res);
            System.out.print(d + " ");
            System.out.println(b);

            System.out.print(c + " ");
            System.out.print(res);
            System.out.print(a + " ");
            System.out.print(b + " ");
            System.out.println(d);
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.io.InputStream;

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

    static class DBearAndTwoPaths {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int d = in.nextInt();
            if (k <= n || k == 4) {
                out.println(-1);
            } else {
                ArrayList<Integer> x = new ArrayList<>();
                x.add(a);
                x.add(c);
                for (int i = 1; i <= n; i++) {
                    if (i == a || i == b || i == c || i == d) {
                        continue;
                    }
                    x.add(i);
                }
                x.add(d);
                x.add(b);
                for (int i = 0; i < n; i++) {
                    out.print(x.get(i) + " ");
                }
                out.println();
                out.print(c + " " + a + " ");
                for (int i = 2; i < n - 2; i++) {
                    out.print(x.get(i) + " ");
                }
                out.println(b + " " + d);

            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.io.InputStream;

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

    static class DBearAndTwoPaths {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int d = in.nextInt();
            if (k == n - 1) {
                out.println(-1);
            } else {
                ArrayList<Integer> x = new ArrayList<>();
                x.add(a);
                x.add(c);
                x.add(d);
                for (int i = 1; i <= n; i++) {
                    if (i == a || i == b || i == c || i == d) {
                        continue;
                    }
                    x.add(i);
                }
                x.add(b);
                for (int i = 0; i < n; i++) {
                    out.print(x.get(i) + " ");
                }
                out.println();
                out.print(c + " " + a + " ");
                for (int i = n - 1; i >= 2; i--) {
                    out.print(x.get(i) + " ");
                }

            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


import java.io.OutputStream;
import java.io.IOException;
import java.io.InputStream;
import java.io.PrintWriter;
import java.util.InputMismatchException;
import java.io.IOException;
import java.util.ArrayList;
import java.io.InputStream;

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

    static class DBearAndTwoPaths {
        public void solve(int testNumber, InputReader in, PrintWriter out) {
            int n = in.nextInt();
            int k = in.nextInt();
            int a = in.nextInt();
            int b = in.nextInt();
            int c = in.nextInt();
            int d = in.nextInt();
            if (k <= n || n == 4) {
                out.println(-1);
            } else {
                ArrayList<Integer> x = new ArrayList<>();
                x.add(a);
                x.add(c);
                for (int i = 1; i <= n; i++) {
                    if (i == a || i == b || i == c || i == d) {
                        continue;
                    }
                    x.add(i);
                }
                x.add(d);
                x.add(b);
                for (int i = 0; i < n; i++) {
                    out.print(x.get(i) + " ");
                }
                out.println();
                out.print(c + " " + a + " ");
                for (int i = 2; i < n - 2; i++) {
                    out.print(x.get(i) + " ");
                }
                out.println(b + " " + d);

            }
        }

    }

    static class InputReader {
        private InputStream stream;
        private byte[] buf = new byte[1024];
        private int curChar;
        private int numChars;

        public InputReader(InputStream stream) {
            this.stream = stream;
        }

        public int read() {
            if (numChars == -1)
                throw new InputMismatchException();
            if (curChar >= numChars) {
                curChar = 0;
                try {
                    numChars = stream.read(buf);
                } catch (IOException e) {
                    throw new InputMismatchException();
                }
                if (numChars <= 0)
                    return -1;
            }
            return buf[curChar++];
        }

        public int nextInt() {
            int c = read();
            while (isSpaceChar(c))
                c = read();
            int sgn = 1;
            if (c == '-') {
                sgn = -1;
                c = read();
            }
            int res = 0;
            do {
                if (c < '0' || c > '9')
                    throw new InputMismatchException();
                res *= 10;
                res += c - '0';
                c = read();
            } while (!isSpaceChar(c));
            return res * sgn;
        }

        private boolean isSpaceChar(int c) {
            return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
        }

    }
}


import java.io.*;
import java.util.*;

public class CodeforcesRound351VKCup2016Round3Div2EditionProblemD {

        static class Problem {

                Scanner reader;
                PrintWriter writer;

                Problem() {

                        reader = new Scanner(System.in);
                        writer = new PrintWriter(System.out);

                }

                void Run() {

                        Solution();

                        writer.close();

                }

                void Solution() {

                        int n = reader.nextInt(), Equal = 0, k = reader.nextInt(), a = reader.nextInt(), b = reader.nextInt(), c = reader.nextInt(), d = reader.nextInt();
                        ArrayList<Integer> roadAB = new ArrayList(), roadCD = new ArrayList();

                        if (n == 4) {
                                writer.print(-1);
                                return;
                        }

                        roadAB.add(a);
                        roadAB.add(c);
                        roadCD.add(c);
                        roadCD.add(a);

                        for (int i = 1; i <= n; i++)
                                if (i != a && i != b && i != c && i != d) {
                                        roadAB.add(i);
                                        roadCD.add(i);
                                }

                        roadAB.add(d);
                        roadAB.add(b);
                        roadCD.add(b);
                        roadCD.add(d);

                        for (int i = 0; i < roadCD.size() - 1; i++)
                                if (((roadAB.get(i) == roadCD.get(i) && roadAB.get(i) == roadCD.get(i))) ||(roadAB.get(i) == roadCD.get(i + 1) && roadAB.get(i + 1) == roadCD.get(i)))
                                        Equal++;

                        if (n == 4 || (n - 1) * 2 - Equal > k) {
                                writer.print(-1);
                                return;
                        }

                        for (int i = 0; i < n; i++)
                                writer.print(roadAB.get(i) + " ");

                        writer.println();

                        for (int i = 0; i < n; i++)
                                writer.print(roadCD.get(i) + " ");

                }

        }

        public static void main(String args[]) {

                Problem D = new Problem();

                D.Run();

        }

}


import java.io.*;
import java.util.*;

public class CodeforcesRound351VKCup2016Round3Div2EditionProblemD {

        static class Problem {

                Scanner reader;
                PrintWriter writer;

                Problem() {

                        reader = new Scanner(System.in);
                        writer = new PrintWriter(System.out);

                }

                void Run() {

                        Solution();

                        writer.close();

                }

                void Solution() {

                        int n = reader.nextInt(), Equal = 0, k = reader.nextInt(), a = reader.nextInt(), b = reader.nextInt(), c = reader.nextInt(), d = reader.nextInt();
                        ArrayList<Integer> roadAB = new ArrayList(), roadCD = new ArrayList();

                        if (n == 4) {
                                writer.print(-1);
                                return;
                        }

                        roadAB.add(a);
                        roadAB.add(c);
                        roadCD.add(c);
                        roadCD.add(a);

                        for (int i = 1; i <= n; i++)
                                if (i != a && i != b && i != c && i != d) {
                                        roadAB.add(i);
                                        roadCD.add(i);
                                }

                        roadAB.add(d);
                        roadAB.add(b);
                        roadCD.add(b);
                        roadCD.add(d);

                        for (int i = 0; i < roadCD.size() - 1; i++)
                                if (((roadAB.get(i) == roadCD.get(i) && roadAB.get(i + 1) == roadCD.get(i + 1))) ||(roadAB.get(i) == roadCD.get(i + 1) && roadAB.get(i + 1) == roadCD.get(i)))
                                        Equal++;

                        if (n == 4 || (n - 1) + (n - 1) - 4 > k) {
                                writer.print(-1);
                                return;
                        }

                        writer.println(Equal);
                        for (int i = 0; i < n; i++)
                                writer.print(roadAB.get(i) + " ");

                        writer.println();

                        for (int i = 0; i < n; i++)
                                writer.print(roadCD.get(i) + " ");

                }

        }

        public static void main(String args[]) {

                Problem D = new Problem();

                D.Run();

        }

}


import java.io.*;
import java.util.*;

public class CodeforcesRound351VKCup2016Round3Div2EditionProblemD {

        static class Problem {

                Scanner reader;
                PrintWriter writer;

                Problem() {

                        reader = new Scanner(System.in);
                        writer = new PrintWriter(System.out);

                }

                void Run() {

                        Solution();

                        writer.close();

                }

                void Solution() {

                        int n = reader.nextInt(), Equal = 0, k = reader.nextInt(), a = reader.nextInt(), b = reader.nextInt(), c = reader.nextInt(), d = reader.nextInt();
                        ArrayList<Integer> roadAB = new ArrayList(), roadCD = new ArrayList();

                        if (n == 4) {
                                writer.print(-1);
                                return;
                        }

                        roadAB.add(a);
                        roadAB.add(c);
                        roadCD.add(c);
                        roadCD.add(a);

                        for (int i = 1; i <= n; i++)
                                if (i != a && i != b && i != c && i != d) {
                                        roadAB.add(i);
                                        roadCD.add(i);
                                }

                        roadAB.add(d);
                        roadAB.add(b);
                        roadCD.add(b);
                        roadCD.add(d);

                        for (int i = 0; i < roadCD.size() - 1; i++)
                                if (((roadAB.get(i + 1) == roadCD.get(i) && roadAB.get(i) == roadCD.get(i + 1))) ||(roadAB.get(i) == roadCD.get(i) && roadAB.get(i + 1) == roadCD.get(i + 1)))
                                        Equal++;

                        if (n == 4 || (n - 1) * 2 - Equal > k) {
                                writer.print(-1);
                                return;
                        }

                        for (int i = 0; i < n; i++)
                                writer.print(roadAB.get(i) + " ");

                        writer.println();

                        for (int i = 0; i < n; i++)
                                writer.print(roadCD.get(i) + " ");

                }

        }

        public static void main(String args[]) {

                Problem D = new Problem();

                D.Run();

        }

}


import java.io.*;
import java.util.*;

public class CodeforcesRound351VKCup2016Round3Div2EditionProblemD {

        static class Problem {

                Scanner reader;
                PrintWriter writer;

                Problem() {

                        reader = new Scanner(System.in);
                        writer = new PrintWriter(System.out);

                }

                void Run() {

                        Solution();

                        writer.close();

                }

                void Solution() {

                        int n = reader.nextInt(), Equal = 0, k = reader.nextInt(), a = reader.nextInt(), b = reader.nextInt(), c = reader.nextInt(), d = reader.nextInt();
                        ArrayList<Integer> roadAB = new ArrayList(), roadCD = new ArrayList();

                        if (n == 4) {
                                writer.print(-1);
                                return;
                        }

                        roadAB.add(a);
                        roadAB.add(c);
                        roadCD.add(c);
                        roadCD.add(a);

                        for (int i = 1; i <= n; i++)
                                if (i != a && i != b && i != c && i != d) {
                                        roadAB.add(i);
                                        roadCD.add(i);
                                }

                        roadAB.add(d);
                        roadAB.add(b);
                        roadCD.add(b);
                        roadCD.add(d);

                        for (int i = 0; i < roadCD.size() - 1; i++)
                                if (((roadAB.get(i) == roadCD.get(i) && roadAB.get(i + 1) == roadCD.get(i + 1))) ||(roadAB.get(i) == roadCD.get(i + 1) && roadAB.get(i + 1) == roadCD.get(i)))
                                        Equal++;

                        if (n == 4 || (n - 1) + 4 > k) {
                                writer.print(-1);
                                return;
                        }

                        for (int i = 0; i < n; i++)
                                writer.print(roadAB.get(i) + " ");

                        writer.println();

                        for (int i = 0; i < n; i++)
                                writer.print(roadCD.get(i) + " ");

                }

        }

        public static void main(String args[]) {

                Problem D = new Problem();

                D.Run();

        }

}


import java.io.*;
import java.util.*;

public class CodeforcesRound351VKCup2016Round3Div2EditionProblemD {

        static class Problem {

                Scanner reader;
                PrintWriter writer;

                Problem() {

                        reader = new Scanner(System.in);
                        writer = new PrintWriter(System.out);

                }

                void Run() {

                        Solution();

                        writer.close();

                }

                void Solution() {

                        int n = reader.nextInt(), Equal = 0, k = reader.nextInt(), a = reader.nextInt(), b = reader.nextInt(), c = reader.nextInt(), d = reader.nextInt();
                        ArrayList<Integer> roadAB = new ArrayList(), roadCD = new ArrayList();

                        if (n == 4) {
                                writer.print(-1);
                                return;
                        }

                        roadAB.add(a);
                        roadAB.add(c);
                        roadCD.add(c);
                        roadCD.add(a);

                        for (int i = 1; i <= n; i++)
                                if (i != a && i != b && i != c && i != d) {
                                        roadAB.add(i);
                                        roadCD.add(i);
                                }

                        roadAB.add(d);
                        roadAB.add(b);
                        roadCD.add(b);
                        roadCD.add(d);

                        for (int i = 0; i < roadCD.size() - 1; i++)
                                if (((roadAB.get(i) == roadCD.get(i) && roadAB.get(i + 1) == roadCD.get(i + 1))) ||(roadAB.get(i) == roadCD.get(i + 1) && roadAB.get(i + 1) == roadCD.get(i)))
                                        Equal++;

                        if (n == 4 || (n - 1) + 2 > k) {
                                writer.print(-1);
                                return;
                        }

                        for (int i = 0; i < n; i++)
                                writer.print(roadAB.get(i) + " ");

                        writer.println();

                        for (int i = 0; i < n; i++)
                                writer.print(roadCD.get(i) + " ");

                }

        }

        public static void main(String args[]) {

                Problem D = new Problem();

                D.Run();

        }

}


import java.io.*;
import java.util.*;

public class CodeforcesRound351VKCup2016Round3Div2EditionProblemD {

        static class Problem {

                Scanner reader;
                PrintWriter writer;

                Problem() {

                        reader = new Scanner(System.in);
                        writer = new PrintWriter(System.out);

                }

                void Run() {

                        Solution();

                        writer.close();

                }

                void Solution() {

                        int n = reader.nextInt(), Equal = 0, k = reader.nextInt(), a = reader.nextInt(), b = reader.nextInt(), c = reader.nextInt(), d = reader.nextInt();
                        ArrayList<Integer> roadAB = new ArrayList(), roadCD = new ArrayList();

                        if (n == 4) {
                                writer.print(-1);
                                return;
                        }

                        roadAB.add(a);
                        roadAB.add(c);
                        roadCD.add(c);
                        roadCD.add(a);

                        for (int i = 1; i <= n; i++)
                                if (i != a && i != b && i != c && i != d) {
                                        roadAB.add(i);
                                        roadCD.add(i);
                                }

                        roadAB.add(d);
                        roadAB.add(b);
                        roadCD.add(b);
                        roadCD.add(d);

                        for (int i = 0; i < roadCD.size() - 1; i++)
                                if (((roadAB.get(i + 1) == roadCD.get(i) && roadAB.get(i) == roadCD.get(i + 1))) ||(roadAB.get(i) == roadCD.get(i + 1) && roadAB.get(i + 1) == roadCD.get(i)))
                                        Equal++;

                        if (n == 4 || (n - 1) * 2 - Equal > k) {
                                writer.print(-1);
                                return;
                        }

                        for (int i = 0; i < n; i++)
                                writer.print(roadAB.get(i) + " ");

                        writer.println();

                        for (int i = 0; i < n; i++)
                                writer.print(roadCD.get(i) + " ");

                }

        }

        public static void main(String args[]) {

                Problem D = new Problem();

                D.Run();

        }

}


import java.io.*;
import java.util.*;

public class CodeforcesRound351VKCup2016Round3Div2EditionProblemD {

        static class Problem {

                Scanner reader;
                PrintWriter writer;

                Problem() {

                        reader = new Scanner(System.in);
                        writer = new PrintWriter(System.out);

                }

                void Run() {

                        Solution();

                        writer.close();

                }

                void Solution() {

                        int n = reader.nextInt(), Equal = 0, k = reader.nextInt(), a = reader.nextInt(), b = reader.nextInt(), c = reader.nextInt(), d = reader.nextInt();
                        ArrayList<Integer> roadAB = new ArrayList(), roadCD = new ArrayList();

                        roadAB.add(a);
                        roadAB.add(c);
                        roadCD.add(c);
                        roadCD.add(a);

                        for (int i = 1; i <= n; i++)
                                if (i != a && i != b && i != c && i != d) {
                                        roadAB.add(i);
                                        roadCD.add(i);
                                }

                        roadAB.add(d);
                        roadAB.add(b);
                        roadCD.add(b);
                        roadCD.add(d);

                        for (int i = 0; i < roadCD.size() - 1; i++)
                                if (((roadAB.get(i + 1) == roadCD.get(i) && roadAB.get(i) == roadCD.get(i + 1))) ||(roadAB.get(i) == roadCD.get(i) && roadAB.get(i + 1) == roadCD.get(i + 1)))
                                        Equal++;

                        if (n == 4 || n * 2 - Equal > k) {
                                writer.print(-1);
                                return;
                        }

                        for (int i = 0; i < n; i++)
                                writer.print(roadAB.get(i) + " ");

                        writer.println();

                        for (int i = 0; i < n; i++)
                                writer.print(roadCD.get(i) + " ");

                }

        }

        public static void main(String args[]) {

                Problem D = new Problem();

                D.Run();

        }

}


//package codeforces351;
import java.io.*;
import java.util.*;

public class q4{
	static InputReader in;
	public static void main(String[] args) throws Exception
	{
		in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		int n=in.nextInt();
		int k=in.nextInt();
		int a=in.nextInt();
		int b=in.nextInt();
		int c=in.nextInt();
		int d=in.nextInt();
		int need=n-1+4;
		if(n>=5 && k>=need)
		{
			PriorityQueue<Integer> pq=new PriorityQueue<Integer>();
			for(int i=1;i<=n;i++)
			{
				pq.add(i);
			}
			pq.remove(a);
			pq.remove(b);
			pq.remove(c);
			pq.remove(d);
			ArrayList<Integer> aa=new ArrayList<Integer>();
			for(int i=0;i<n-4;i++)
			{
				aa.add(pq.remove());
			}
			pw.print(a+" "+c+" ");
			for(int i=0;i<aa.size();i++)
			{
				pw.print(aa.get(i)+" ");
			}
			pw.print(d+" "+b);
			pw.println();
			pw.print(c+" ");
			pw.print(b+" ");
			pw.print(aa.get(0)+" ");
			pw.print(a+" ");
			for(int i=1;i<aa.size();i++)
			{
				pw.print(aa.get(i)+" ");
			}
			pw.print(d);
			pw.println();

		}
		else
		{
			pw.println(-1);
		}

		pw.close();
	}
	public static long[] readlong(int n)
	{
		long[] a=new long[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextLong();
		}
		return a;
	}
	public static int[] readint(int n)
	{
		int[] a=new int[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextInt();
		}
		return a;
	}

	 static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[8192];
		private int curChar;
		private int snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			int res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			long res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}


//package codeforces351;
import java.io.*;
import java.util.*;

public class q4{
	static InputReader in;
	public static void main(String[] args) throws Exception
	{
		in=new InputReader(System.in);
		PrintWriter pw=new PrintWriter(System.out);
		int n=in.nextInt();
		int k=in.nextInt();
		int a=in.nextInt();
		int b=in.nextInt();
		int c=in.nextInt();
		int d=in.nextInt();
		int need=n-1+2;
		if(n>=5 && k>=need)
		{
			PriorityQueue<Integer> pq=new PriorityQueue<Integer>();
			for(int i=1;i<=n;i++)
			{
				pq.add(i);
			}
			pq.remove(a);
			pq.remove(b);
			pq.remove(c);
			pq.remove(d);
			ArrayList<Integer> aa=new ArrayList<Integer>();
			for(int i=0;i<n-4;i++)
			{
				aa.add(pq.remove());
			}
			pw.print(a+" "+d+" ");
			for(int i=0;i<aa.size();i++)
			{
				pw.print(aa.get(i)+" ");
			}
			pw.print(c+" "+b);
			pw.println();
			pw.print(c+" ");
			pw.print(b+" ");
			//pw.print(aa.get(0)+" ");
			//pw.print(a+" ");
			for(int i=aa.size()-1;i>=0;i--)
			{
				pw.print(aa.get(i)+" ");
			}
			pw.print(a+" "+d);
			pw.println();

		}
		else
		{
			pw.println(-1);
		}

		pw.close();
	}
	public static long[] readlong(int n)
	{
		long[] a=new long[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextLong();
		}
		return a;
	}
	public static int[] readint(int n)
	{
		int[] a=new int[n];
		for(int i=0;i<n;i++)
		{
			a[i]=in.nextInt();
		}
		return a;
	}

	 static class InputReader {

		private InputStream stream;
		private byte[] buf = new byte[8192];
		private int curChar;
		private int snumChars;
		private SpaceCharFilter filter;

		public InputReader(InputStream stream) {
			this.stream = stream;
		}

		public int snext() {
			if (snumChars == -1)
				throw new InputMismatchException();
			if (curChar >= snumChars) {
				curChar = 0;
				try {
					snumChars = stream.read(buf);
				} catch (IOException e) {
					throw new InputMismatchException();
				}
				if (snumChars <= 0)
					return -1;
			}
			return buf[curChar++];
		}

		public int nextInt() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			int res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}

		public long nextLong() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			int sgn = 1;
			if (c == '-') {
				sgn = -1;
				c = snext();
			}

			long res = 0;

			do {
				if (c < '0' || c > '9')
					throw new InputMismatchException();
				res *= 10;
				res += c - '0';
				c = snext();
			} while (!isSpaceChar(c));

			return res * sgn;
		}

		public String readString() {
			int c = snext();
			while (isSpaceChar(c))
				c = snext();
			StringBuilder res = new StringBuilder();
			do {
				res.appendCodePoint(c);
				c = snext();
			} while (!isSpaceChar(c));
			return res.toString();
		}

		public boolean isSpaceChar(int c) {
			if (filter != null)
				return filter.isSpaceChar(c);
			return c == ' ' || c == '\n' || c == '\r' || c == '\t' || c == -1;
		}

		public interface SpaceCharFilter {
			public boolean isSpaceChar(int ch);
		}
	}

}


// CodeForces Round #673 D competition

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.PriorityQueue;

public class BearTwoPaths {

	int n,k;
	int a,b,c,d;
	int []pa;
	int []pb;

	private void readData(BufferedReader bin) throws IOException {
		String s = bin.readLine();
		String []ss = s.split(" ");
		n = Integer.parseInt(ss[0]);
		k = Integer.parseInt(ss[1]);
		// read t
		s = bin.readLine();
		ss = s.split(" ");
		a = Integer.parseInt(ss[0]);
		b = Integer.parseInt(ss[1]);
		c = Integer.parseInt(ss[2]);
		d = Integer.parseInt(ss[3]);
	}

	void printRes() {
		if (pa==null) {
			System.out.println(-1);
			return;
		}
		for (int i=0; i<n; i++) {
			System.out.print(pa[i] + " ");
		}
		System.out.println();
		for (int i=0; i<n; i++) {
			System.out.print(pb[i] + " ");
		}
		System.out.println();
	}

	private void calculate() {
		if (k<n+1) {
			pa = null;
			return;
		}
		pa = new int[n];
		pb = new int[n];
		// moving a->0 c->1 d->2 b->n-1
		int []idx = new int[n];
		idx[0] = a;
		idx[1] = d;
		idx[2] = c;
		idx[n-1] = b;
		int ii = 1;
		// fill all other indexes
		for (int i=3; i<n-1; i++) {
			while (!(ii!=a && ii!=b && ii!=c && ii!=d)) {
				ii++;
			}
			idx[i] = ii++;
		}
		for (int i=0; i<n; i++) {
			pa[i] = idx[i];
		}
		for (int i=2; i<n; i++) {
			pb[i-2] = idx[i];
		}
		pb[n-2] = a;
		pb[n-1] = d;
	}

	public static void main(String[] args) throws IOException {
		// BufferedReader bin = new BufferedReader(new FileReader("cactus.in"));
		BufferedReader bin = new BufferedReader(
				new InputStreamReader(System.in));
		BearTwoPaths l = new BearTwoPaths();
		l.readData(bin);
		l.calculate();
		l.printRes();
	}
}


// CodeForces Round #673 D competition

import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;
import java.util.HashMap;
import java.util.PriorityQueue;

public class BearTwoPaths {

	int n,k;
	int a,b,c,d;
	int []pa;
	int []pb;

	private void readData(BufferedReader bin) throws IOException {
		String s = bin.readLine();
		String []ss = s.split(" ");
		n = Integer.parseInt(ss[0]);
		k = Integer.parseInt(ss[1]);
		// read t
		s = bin.readLine();
		ss = s.split(" ");
		a = Integer.parseInt(ss[0]);
		b = Integer.parseInt(ss[1]);
		c = Integer.parseInt(ss[2]);
		d = Integer.parseInt(ss[3]);
	}

	void printRes() {
		if (pa==null) {
			System.out.println(-1);
			return;
		}
		for (int i=0; i<n; i++) {
			System.out.print(pa[i] + " ");
		}
		System.out.println();
		for (int i=0; i<n; i++) {
			System.out.print(pb[i] + " ");
		}
		System.out.println();
	}

	private void calculate() {
		if (k<n+2) {
			pa = null;
			return;
		}
		pa = new int[n];
		pb = new int[n];
		// moving a->0 c->1 d->2 b->n-1
		int []idx = new int[n];
		idx[0] = a;
		idx[1] = d;
		idx[n-2] = c;
		idx[n-1] = b;
		int ii = 1;
		// fill all other indexes
		for (int i=2; i<n-2; i++) {
			while (!(ii!=a && ii!=b && ii!=c && ii!=d)) {
				ii++;
			}
			idx[i] = ii++;
		}
		for (int i=0; i<n; i++) {
			pa[i] = idx[i];
			pb[i] = idx[i];
		}
		pb[0] = c;
		pb[1] = a;
		pb[n-2] = b;
		pb[n-1] = d;
	}

	public static void main(String[] args) throws IOException {
		// BufferedReader bin = new BufferedReader(new FileReader("cactus.in"));
		BufferedReader bin = new BufferedReader(
				new InputStreamReader(System.in));
		BearTwoPaths l = new BearTwoPaths();
		l.readData(bin);
		l.calculate();
		l.printRes();
	}
}