#include <bits/stdc++.h>
using namespace std;
using ll = long long;
int main() {
  ios::sync_with_stdio(0), cin.tie(0);
  int n, q;
  cin >> n >> q;
  ll off[2] = {};
  for (int i = 0; i < q; ++i) {
    int t, x;
    cin >> t;
    if (t == 1) {
      cin >> x;
      if (x % 2) swap(off[0], off[1]);
      off[0] += n - x;
      off[1] += n - x;
    } else {
      swap(off[0], off[1]);
      off[0] += 1;
      off[1] += n - 1;
    }
  }
  for (int i = 0; i < n; ++i) {
    cout << (i + off[i % 2]) % n + 1 << ' ';
  }
}
