#include <bits/stdc++.h>
using namespace std;
int* fp;
int* sp;
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  int n2 = n / 2;
  fp = new int[n2];
  sp = new int[n2];
  for (int i = 0; i < n2; i++) {
    fp[i] = i * 2;
    sp[i] = i * 2 + 1;
  }
  int fc = 0, sc = 0;
  for (int i = 0; i < q; i++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      x = -x;
      if (x < 0) {
        x += n;
      }
      if (x & 1) {
        int df = (x + 1) / 2;
        int ds = x - df;
        fc = (fc + df) % n2;
        sc = (sc + ds) % n2;
        swap(fp, sp);
        swap(fc, sc);
      } else {
        int df = x / 2;
        int ds = x - df;
        fc = (fc + df) % n2;
        sc = (sc + ds) % n2;
      }
    } else {
      swap(fp, sp);
      swap(fc, sc);
    }
  }
  for (int i = 0; i < n; i++) {
    if (i & 1) {
      printf("%d ", sp[(sc + i / 2) % n2] + 1);
    } else {
      printf("%d ", fp[(fc + i / 2) % n2] + 1);
    }
  }
  return 0;
}
