#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  int n, q;
  cin >> n >> q;
  int st1, st2;
  st1 = 0;
  st2 = 1;
  while (q--) {
    int cmd;
    cin >> cmd;
    if (cmd == 1) {
      int v;
      cin >> v;
      st1 = (st1 + v + n) % n;
      st2 = (st2 + v + n) % n;
    } else {
      if (st1 & 1) {
        st1 = (st1 - 1 + n) % n;
        st2 = (st2 + 1 + n) % n;
      } else {
        st1 = (st1 + 1 + n) % n;
        st2 = (st2 - 1 + n) % n;
      }
    }
  }
  int val1, val2;
  if (st1 & 1) {
    val1 = (1 - st2 + n) % n;
    val2 = (0 - (st1 - 1) + n) % n;
  } else {
    val1 = (0 - st1 + n) % n;
    val2 = (1 - (st2 - 1) + n) % n;
  }
  for (int i = 0; i < n / 2; i++) {
    cout << val1 + 1 << " " << val2 + 1 << " ";
    val1 = (val1 + 2) % n;
    val2 = (val2 + 2) % n;
  }
  return 0;
}
