#include <bits/stdc++.h>
using namespace std;
long n, m;
long subsize[10000000], ar[10000000];
long x, y, tp, er;
vector<long> ans;
long anss[3000000];
long q;
set<long> f;
set<long>::iterator it;
long usd[2000000];
void build(long v, long tl, long tr) {
  if (tl == tr) {
    if (tl > 1000000 && tl <= 1000000 + n) subsize[v] = 1;
    return;
  }
  long sdfjahlfasfh = tl + tr;
  sdfjahlfasfh /= 2;
  build(v * 2, tl, sdfjahlfasfh);
  build(v * 2 + 1, sdfjahlfasfh + 1, tr);
  subsize[v] = subsize[v * 2] + subsize[v * 2 + 1];
}
long solve(long v, long tl, long tr, long need) {
  if (tl == tr) {
    return tl;
  }
  long sdfjahlfasfh = tl + tr;
  sdfjahlfasfh /= 2;
  if (subsize[v * 2] >= need) {
    return solve(v * 2, tl, sdfjahlfasfh, need);
  }
  need -= subsize[v * 2];
  return solve(v * 2 + 1, sdfjahlfasfh + 1, tr, need);
}
void update(long v, long tl, long tr, long ps, long val) {
  if (tl == tr) {
    ar[tl] = val;
    if (val == 0)
      subsize[v] = 0;
    else
      subsize[v] = 1;
    return;
  }
  long sdfjahlfasfh = tl + tr;
  sdfjahlfasfh /= 2;
  if (ps <= sdfjahlfasfh) {
    update(v * 2, tl, sdfjahlfasfh, ps, val);
  } else
    update(v * 2 + 1, sdfjahlfasfh + 1, tr, ps, val);
  subsize[v] = subsize[v * 2] + subsize[v * 2 + 1];
}
int main() {
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  build(1, 1, 2000000);
  for (int i = 1; i <= m; i++) {
    cin >> x >> y;
    tp = solve(1, 1, 2000000, y);
    if (ar[tp] != 0 && ar[tp] != x) {
      er = 1;
    }
    anss[tp] = x;
    update(1, 1, 2000000, tp, 0);
    update(1, 1, 2000000, 1000001 - i, x);
  }
  for (int i = 1; i <= n; i++) f.insert(i);
  for (int i = 1000001; i <= 1000000 + n; i++) {
    if (anss[i] == 0) continue;
    if (usd[anss[i]]) er = 1;
    usd[anss[i]] = 1;
    f.erase(anss[i]);
  }
  for (int i = 1; i <= n; i++) {
    if (anss[i + 1000000] == 0) {
      it = f.begin();
      q = (*it);
      f.erase(it);
      ans.push_back(q);
    } else {
      ans.push_back(anss[i + 1000000]);
    }
  }
  if (er)
    cout << -1 << endl;
  else {
    for (int i = 0; i < ans.size(); i++) {
      if (i) cout << " ";
      cout << ans[i];
    }
    cout << endl;
  }
  cin.get();
  cin.get();
  return 0;
}
