#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e6 + 10;
int n, q;
int has[MAXN];
int main() {
  scanf("%d%d", &n, &q);
  int odd = 0, even = 1;
  while (q--) {
    int op, para;
    scanf("%d", &op);
    if (op == 2)
      odd ^= 1, even ^= 1;
    else {
      scanf("%d", &para);
      if (para < 0) para += n;
      odd = (odd + para) % n;
      even = (even + para) % n;
    }
  }
  for (int ii = 0; ii < n; ii++) {
    if (ii % 2 == 0)
      has[odd] = ii, odd = (odd + 2) % n;
    else
      has[even] = ii, even = (even + 2) % n;
  }
  for (int ii = 0; ii < n; ii++) {
    printf("%d ", has[ii] + 1);
  }
}
