#include <bits/stdc++.h>
using namespace std;
signed main() {
  long long int N, K;
  cin >> N >> K;
  vector<long long int> v;
  for (long long int i = 0; i < (long long int)(K); ++i) {
    long long int L, R;
    cin >> L >> R;
    for (long long int j = L; j <= (long long int)(R); ++j) {
      v.push_back(j);
    }
  }
  return 0;
}
