#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, k, a, b, c, d, ic, id;
  cin >> n >> k;
  cin >> a >> b >> c >> d;
  vector<int> ans, ans2;
  ans.push_back(a);
  if (c != a) {
    ans.push_back(c);
  }
  for (int i = 1; i <= n; i++) {
    if (i == a || i == b || i == c || i == d) {
      continue;
    }
    ans.push_back(i);
  }
  if (d != b) {
    ans.push_back(d);
  }
  ans.push_back(b);
  for (int i = 0; i < n; i++) {
    if (ans[i] == c) {
      ic = i;
    } else if (ans[i] == d) {
      id = i;
    }
  }
  if (id == ic + 1) {
    cout << -1;
    return 0;
  }
  if ((a == c && b == d) || (a == d && b == c)) {
  } else if (a == c || a == d || b == c || b == d) {
    if (k < n) {
      cout << -1;
      return 0;
    }
  } else {
    if (k < n + 1) {
      cout << -1;
      return 0;
    }
  }
  int cnt = ic;
  int flag = 0;
  for (int i = 0; i < n; i++) {
    ans2.push_back(ans[cnt]);
    if (flag == 0) {
      if (cnt == 0) {
        cnt = ic + 1;
        flag = 1;
      } else {
        cnt--;
      }
    } else if (flag == 1) {
      cnt++;
      if (ans[cnt] == d) {
        cnt = n - 1;
        flag = 2;
      }
    } else {
      cnt--;
    }
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i];
    if (i != n) {
      cout << " ";
    }
  }
  cout << endl;
  for (int i = 0; i < n; i++) {
    cout << ans2[i];
    if (i != n) {
      cout << " ";
    }
  }
  return 0;
}
