#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q;
  cin >> n >> q;
  int x = 0;
  int y = 1;
  for (int i = 0; i < q; i++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int r;
      scanf("%d", &r);
      (x += n + r) %= n;
      (y += n + r) %= n;
    } else {
      x ^= 1;
      y ^= 1;
    }
  }
  vector<int> ans(n);
  for (int i = 0; i < n / 2; i++) {
    ans[(x + i * 2) % n] = i * 2 + 1;
    ans[(y + i * 2) % n] = i * 2 + 2;
  }
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  cout << endl;
}
