#include <bits/stdc++.h>
using namespace std;
using ll = long long;
using ld = long double;
using D = double;
using uint = unsigned int;
vector<int> answer;
int n, k, a, b, c, d;
int main() {
  scanf("%d%d", &n, &k);
  scanf("%d%d%d%d", &a, &b, &c, &d);
  if (k == n - 1 || k == n || n == 4) {
    cout << -1 << endl;
    return 0;
  }
  answer.push_back(a);
  answer.push_back(d);
  for (int i = 1; i <= n; i++)
    if (i != a && i != b && i != c && i != d) answer.push_back(i);
  answer.push_back(c);
  answer.push_back(b);
  for (int i = 0; i < n; i++) printf("%d ", answer[i]);
  printf("\n");
  for (int i = n - 2; i < n; i++) printf("%d ", answer[i]);
  for (int i = n - 3; i > 1; i--) printf("%d ", answer[i]);
  for (int i = 0; i < 2; i++) printf("%d ", answer[i]);
  printf("\n");
  return 0;
}
