#include <bits/stdc++.h>
using namespace std;
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  long long n, q;
  cin >> n >> q;
  vector<pair<long long, long long> > arr(q);
  for (long long i = 0; i < q; i++) {
    long long t;
    cin >> t;
    long long x = 0;
    if (t == 1) {
      cin >> x;
    }
    arr[i] = {t, x};
  }
  long long cnt0 = 0;
  long long now0 = 0;
  long long cnt1 = 0;
  long long now1 = 1;
  for (auto elem : arr) {
    if (elem.first == 1) {
      now0 += elem.second;
      now0 = (now0 % 2 + 2) % 2;
    } else {
      if (now0 == 0) {
        cnt0--;
        now0 = 1;
      } else {
        cnt0++;
        now0 = 0;
      }
    }
  }
  long long S = 0;
  for (auto elem : arr) {
    if (elem.first == 1) {
      now1 += elem.second;
      S += elem.second;
      S %= n;
      now1 = (now1 % 2 + 2) % 2;
    } else {
      if (now1 == 0) {
        cnt1--;
        now1 = 1;
      } else {
        cnt1++;
        now1 = 0;
      }
    }
  }
  vector<long long> ans(n);
  for (long long i = 0; i < n; i++) {
    long long pos = i;
    pos += S;
    if ((i + 1) % 2 == 1)
      pos += cnt1;
    else
      pos += cnt0;
    pos = (pos % n + n) % n;
    ans[pos] = i + 1;
  }
  for (auto elem : ans) {
    cout << elem << " ";
  }
  cout << endl;
}
