#include <bits/stdc++.h>
using namespace std;
const int N = 100010;
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  int n, k;
  cin >> n >> k;
  if (k <= n || n < 5) {
    cout << -1;
    return 0;
  }
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  vector<int> p1, p2;
  set<pair<int, int> > e;
  p1.push_back(a);
  p1.push_back(c);
  for (int i = 1; i <= n; i++) {
    if (i != a && i != c && i != b && i != d) p1.push_back(i);
  }
  p1.push_back(d);
  p1.push_back(b);
  p2.push_back(c);
  p2.push_back(a);
  for (int i = 1; i <= n; i++) {
    if (i != a && i != b && i != c && i != d) p2.push_back(i);
  }
  p2.push_back(b);
  p2.push_back(d);
  for (int i = 0; i < n; i++) cout << p1[i] << " ";
  cout << "\n";
  for (int i = 0; i < n; i++) cout << p2[i] << " ";
  return 0;
}
