#include <bits/stdc++.h>
using namespace std;
const long long MOD = (long long)1e9 + 7;
const long double PI = 3.141592653589793238462643383279502884197;
long long fac[1] = {1}, inv[1] = {1};
long long gcd(long long a, long long b) { return b ? gcd(b, a % b) : a; }
long long mp(long long a, long long b) {
  long long ret = 1;
  while (b) {
    if (b & 1) ret = ret * a % MOD;
    a = a * a % MOD;
    b >>= 1;
  }
  return ret;
}
long long cmb(long long r, long long c) {
  return fac[r] * inv[c] % MOD * inv[r - c] % MOD;
}
priority_queue<int, vector<int>, greater<int>> pq;
int tree[1 << 22];
int szz = 1 << 21;
int pos[1 << 22];
int ini[1 << 22];
char visit[1000001];
void update(int i, int val) {
  i += szz;
  tree[i] += val;
  while (i /= 2) tree[i] = tree[i * 2] + tree[i * 2 + 1];
}
int worm(int i, int x) {
  if (tree[i] < x) return worm(i + 1, x - tree[i]);
  if (i >= szz) return i - szz;
  return worm(i * 2, x);
}
void init(int i) {
  if (i >= szz) return;
  init(i * 2);
  init(i * 2 + 1);
  tree[i] = tree[i * 2] + tree[i * 2 + 1];
}
int main() {
  memset(pos, -1, sizeof(pos));
  int n, m;
  scanf("%d %d", &n, &m);
  int now = 1000001;
  for (int i = 0; i < n; i++) tree[now + szz + i] = 1, pos[now + i] = i + 1;
  init(1);
  int a, b;
  for (int i = 0; i < m; i++) {
    scanf("%d %d", &a, &b);
    int tt = worm(1, b);
    update(tt, -1);
    int tmp = pos[tt];
    if (ini[tmp] && ini[tmp] != a) return !printf("-1");
    if (visit[a] && ini[tmp] != a) return !printf("-1");
    ini[tmp] = a;
    visit[a] = 1;
    pos[tt] = -1;
    update(--now, 1);
    pos[now] = tmp;
  }
  int cnt = 1;
  for (int i = 1; i <= n; i++) {
    if (!ini[i]) {
      while (visit[cnt]) cnt++;
      ini[i] = cnt;
      visit[cnt] = 1;
    }
    printf("%d ", ini[i]);
  }
}
