#include <bits/stdc++.h>
int n, m;
int first[2300000];
int second[2300000];
int last[1050000];
int wei[1050000];
int pei[1050000];
int ans[1050000];
void add(int a[], int x) {
  x += 1048576 - 1;
  while (x) {
    a[x]++;
    x >>= 1;
  }
}
void del(int a[], int x) {
  x += 1048576 - 1;
  while (x) {
    a[x]--;
    x >>= 1;
  }
}
int find(int a[], int now, int l, int r, int x) {
  if (l == r) return l;
  int mid = (l + r) / 2;
  if (x <= a[now << 1]) return (find(a, now << 1, l, mid, x));
  return (find(a, now * 2 + 1, mid + 1, r, x - a[now << 1]));
}
int main() {
  int i, a, b;
  scanf("%d%d", &n, &m);
  for (i = 1; i <= n; i++) add(second, i);
  for (i = 1; i <= m; i++) {
    scanf("%d%d", &a, &b);
    if (first[1] >= b)
      b = wei[find(first, 1, 1, 1048576, first[1] - b + 1)];
    else
      b = find(second, 1, 1, 1048576, b - first[1]);
    if (ans[b] == a) {
      wei[i] = b;
      del(first, last[b]);
      last[b] = i;
      add(first, i);
      continue;
    }
    if (ans[b] || pei[a]) {
      printf("-1\n");
      return 0;
    }
    ans[b] = a;
    pei[a] = b;
    last[b] = i;
    wei[i] = b;
    del(second, b);
    add(first, i);
  }
  int now = 0;
  for (i = 1; i <= n; i++)
    if (!ans[i]) {
      now++;
      while (pei[now]) now++;
      ans[i] = now;
    }
  for (i = 1; i < n; i++) printf("%d ", ans[i]);
  printf("%d\n", ans[n]);
  return 0;
}
