#include <bits/stdc++.h>
using namespace std;
int pos[1000001], last[1000001], ap[1000001], sum[2 * 1000001], cnt;
int n, m;
void update(int i, int val) {
  while (i <= m) {
    sum[i] += val;
    i += (i & (-i));
  }
}
int query(int x) {
  int ret = 0;
  while (x > 0) {
    ret += sum[x];
    x -= (x & (-x));
  }
  return ret;
}
int a[4 * 1000001];
void update2(int u, int lb, int rb, int tar) {
  if (lb == rb) {
    a[u]++;
    return;
  }
  a[u]++;
  int mid = (lb + rb) >> 1;
  if (mid >= tar) update2(u + u, lb, mid, tar);
  if (mid < tar) update2(u + u + 1, mid + 1, rb, tar);
}
int visit(int u, int lb, int rb, int tar) {
  if (lb == rb) {
    if (lb == tar) return lb;
    return -1;
  }
  int mid = (lb + rb) >> 1;
  if (tar - a[u + u + 1] > mid) {
    visit(u + u + 1, mid + 1, rb, tar);
  } else {
    visit(u + u, lb, mid, tar - a[u + u + 1]);
  }
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d%d", &x, &y);
    if (last[x] == 0) {
      int po = visit(1, 1, n, y);
      if (po == -1 || pos[po]) {
        puts("-1");
        return 0;
      }
      pos[po] = x;
      last[x] = i;
      update(i, 1);
      update2(1, 1, n, po);
    } else {
      int rt = 1 + query(i) - query(last[x]);
      if (rt != y) {
        puts("-1");
        return 0;
      }
      update(last[x], -1);
      last[x] = i;
      update(last[x], 1);
    }
  }
  for (int i = 1; i <= n; i++) ap[pos[i]] = 1;
  int cnt = 1;
  for (int i = 1; i <= n; i++)
    if (!pos[i]) {
      while (ap[cnt]) cnt++;
      pos[i] = cnt;
      ap[cnt] = 1;
    }
  for (int i = 1; i <= n - 1; i++) printf("%d ", pos[i]);
  printf("%d\n", pos[n]);
}
