#include <bits/stdc++.h>
using namespace std;
void err(istream_iterator<string> it) {}
template <typename T, typename... Args>
void err(istream_iterator<string> it, T a, Args... args) {
  cout << *it << " = " << a << "\n";
  err(++it, args...);
}
const long long N = 1e6 + 5, M = 1e9 + 7, inf = 1e18;
int t[N];
void up(int p, int v) {
  if (p <= 0) return;
  for (; p < N; p += (p & -p)) {
    t[p] += v;
  }
}
int qry(int p) {
  int res = 0;
  for (; p > 0; p -= (p & -p)) {
    res += t[p];
  }
  return res;
}
int posof(long long prefsum) {
  int pos = 0;
  long long sum = 0;
  for (int i = 21; i >= 0; --i) {
    if ((pos + (1 << i) <= N) && (sum + t[pos + (1 << i)] < prefsum)) {
      pos += (1 << i);
      sum += t[pos];
    }
  }
  return pos + 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  int n, m;
  cin >> n >> m;
  vector<int> pos(n + 1), pre(n + 1, -1), ans;
  vector<pair<int, int> > q[m];
  int a[m], id = 0;
  for (int i = 1; i < n + 1; i++) {
    up(i, 1);
  }
  set<int> s;
  for (int i = 0; i < m; i++) {
    int x, y;
    cin >> x >> y;
    a[i] = x;
    if (pre[x] != -1 and y > ((int)(s).size())) {
      return cout << -1, 0;
    }
    if (pre[x] == -1 and y <= ((int)(s).size())) {
      return cout << -1, 0;
    }
    if (y > ((int)(s).size())) {
      pos[x] = posof(y);
      ;
      up(1, 1);
      up(pos[x], -1);
    } else {
      int l = pre[x];
      q[l + 1].push_back({i, id++});
      ans.push_back(y);
    }
    pre[x] = i;
    s.insert(x);
  }
  memset(t, 0, sizeof t);
  vector<int> nxt(n + 1, -1);
  for (int i = m - 1; i >= 0; i--) {
    int x = a[i];
    if (nxt[x] != -1) {
      up(nxt[x], -1);
    }
    up(i, 1);
    nxt[x] = i;
    for (auto p : q[i]) {
      int r = p.first, id = p.second;
      if (ans[id] != qry(r)) {
        return cout << -1, 0;
      }
    }
  }
  s.clear();
  for (int i = 1; i < n + 1; i++) {
    s.insert(i);
  }
  for (int i = 1; i < n + 1; i++)
    if (pos[i]) {
      s.erase(pos[i]);
    }
  for (int i = 1; i < n + 1; i++) {
    if (not pos[i]) {
      pos[i] = *s.begin();
      s.erase(s.begin());
    }
  }
  vector<int> fans(n + 1);
  for (int i = 1; i < n + 1; i++) {
    fans[pos[i]] = i;
  }
  for (int i = 1; i < n + 1; i++) {
    cout << fans[i] << " ";
  }
}
