#include <bits/stdc++.h>
using namespace std;
vector<int> v;
int a[1000007];
int b[1000007];
int main() {
  int i;
  for (i = 0; i < 2; i++) scanf("%d", a + i);
  for (i = 0; i < 4; i++) scanf("%d", b + i);
  if (a[0] > 4) {
    if (a[1] >= a[0] + 1) {
      int lt;
      v.push_back(b[0]);
      for (i = 1; i <= a[0]; i++)
        if (i != b[0] && i != b[1] && i != b[2] && i != b[3]) {
          lt = i;
          break;
        }
      for (i = 1; i <= a[0]; i++)
        if (i != b[0] && i != b[1] && i != b[2] && i != b[3] && i != lt) {
          v.push_back(i);
        }
      v.push_back(b[2]);
      v.push_back(lt);
      v.push_back(b[3]);
      v.push_back(b[1]);
      for (i = 0; i < v.size(); i++) printf("%d ", v[i]);
      printf("\n");
      for (i = (int)v.size() - 4; i >= 0; i--) printf("%d ", v[i]);
      printf("%d ", v[(int)v.size() - 3]);
      printf("%d %d", v[(int)v.size() - 1], v[v.size() - 2]);
    } else
      printf("-1");
  } else
    printf("-1");
  return 0;
}
