#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, k;
  cin >> n >> k;
  int a, b, c, d;
  cin >> a >> b >> c >> d;
  if (n == 4 || k <= n) {
    cout << -1;
    return 0;
  }
  cout << a << " " << c << " ";
  int visited[1001];
  memset(visited, 0, sizeof visited);
  visited[a] = 1;
  visited[b] = 1;
  visited[c] = 1;
  visited[d] = 1;
  for (int i = 1; i <= n; i++) {
    if (visited[i] == 0) {
      cout << i << " ";
    }
  }
  cout << d << " " << b << endl;
  memset(visited, 0, sizeof visited);
  visited[a] = 1;
  cout << c << " " << a << " ";
  visited[b] = 1;
  visited[c] = 1;
  visited[d] = 1;
  for (int i = 1; i <= n; i++) {
    if (visited[i] == 0) {
      cout << i << " ";
    }
  }
  cout << b << " " << d << endl;
}
