#include <bits/stdc++.h>
int LN, LM, res[50];
int main() {
  scanf("%d %d", &LN, &LM);
  memset(res, -1, sizeof(res));
  for (int i = 0; i < LM; i++) {
    int a, b;
    scanf("%d %d", &a, &b);
    a--;
    if ((res[a] != -1 && res[a] != b)) {
      printf("-1\n");
      exit(0);
    }
    res[a] = b;
  }
  for (int i = 0; i < LN; i++) {
    if (res[i] == -1) {
      res[i] = 0;
    }
  }
  if (res[0] == 0) {
    printf("-1\n");
    exit(0);
  }
  for (int i = 0; i < LN; i++) {
    printf("%d ", res[i]);
  }
  printf("\n");
  return 0;
}
