#include <bits/stdc++.h>
using namespace std;
template <typename T>
T read() {
  T x;
  cin >> x;
  return x;
}
int dx[] = {0, 0, 1, -1, 1, -1, 1, -1}, dy[] = {-1, 1, 0, 0, 1, -1, -1, 1};
void run();
int main() {
  ios::sync_with_stdio(0);
  cout << fixed << setprecision(16);
  run();
}
const int N = 1000200;
int tree[2 * N + 1];
int n, m, lo, mid;
int pos[N], init_pos[N], res[N];
void update_idx(int tree[], int i, int val) {
  i++;
  for (; i <= 2 * N; i += i & -i) tree[i] += val;
}
int read_prefix(int tree[], int i) {
  i++;
  int sum = 0;
  for (; i > 0; i -= i & -i) sum += tree[i];
  return sum;
}
void debug(int l, int r) {
  cout << "tree=";
  for (int i = l; i <= r; ++i)
    cout << read_prefix(tree, i) - read_prefix(tree, i - 1) << " ";
  cout << "\n";
}
int kth(int k) {
  int lo = 1, hi = mid + n;
  while (lo < hi) {
    int mid = (lo + hi) / 2;
    if (read_prefix(tree, mid) >= k)
      hi = mid;
    else
      lo = mid + 1;
  }
  return lo;
}
bool solve() {
  cin >> n >> m;
  lo = mid = m + 100;
  for (int i = mid + 1; i <= mid + n; ++i) update_idx(tree, i, +1);
  for (int i = (0), __ee = (m); i < __ee; ++i) {
    int x, y;
    cin >> x >> y;
    if (!pos[x]) {
      pos[x] = kth(y);
      if (pos[x] <= mid) return 0;
      assert(pos[x] >= mid + 1);
      init_pos[x] = pos[x] - mid;
    }
    if (read_prefix(tree, pos[x]) != y) return 0;
    update_idx(tree, pos[x], -1);
    pos[x] = lo--;
    update_idx(tree, pos[x], 1);
  }
  for (int i = 1; i <= n; ++i)
    if (init_pos[i]) res[init_pos[i]] = i;
  int p = 1;
  for (int i = 1; i <= n; ++i)
    if (!init_pos[i]) {
      while (res[p]) ++p;
      res[p] = i;
    }
  for (int i = 1; i <= n; ++i) cout << res[i] << " ";
  cout << "\n";
  return 1;
}
void run() {
  if (!solve()) cout << -1 << "\n";
}
