#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  int t0 = 0, t1 = 1;
  for (int i = 0; i < q; i++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int d;
      scanf("%d", &d);
      t0 += d;
      t1 += d;
      t0 = (t0 + n) % n;
      t1 = (t1 + n) % n;
    } else {
      if (t0 % 2 == 0) {
        t0++;
      } else
        t0--;
      if (t1 % 2 == 0) {
        t1++;
      } else
        t1--;
    }
  }
  vector<int> boy(n);
  for (int i = 0; i < n / 2; i++) {
    boy[(t0 + 2 * i) % n] = 2 * i;
    boy[(t1 + 2 * i) % n] = 2 * i + 1;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", boy[i] + 1);
  }
  return 0;
}
