#include <bits/stdc++.h>
int main(void) {
  int n, m, i, s, c;
  scanf("%d%d", &n, &m);
  int num[4], cnt[4];
  for (i = 1; i < 4; i++) {
    num[i] = 0;
    cnt[i] = 0;
  }
  printf("-1");
  return 0;
}
