#include <bits/stdc++.h>
using namespace std;
int n, q;
struct gg {
  long long tot;
  bool flag;
  int s;
  gg() {
    tot = 0;
    flag = 0;
    s = 0;
  }
} odd, even;
int main() {
  scanf("%d%d", &n, &q);
  odd.flag = 1;
  gg tmp;
  odd.s = 1, even.s = 2;
  for (int i = 1; i <= q; i++) {
    int ty, x;
    scanf("%d", &ty);
    if (ty == 1) {
      scanf("%d", &x);
      if (!x) continue;
      if (abs(x) & 1) {
        if (x > 0)
          even.tot++;
        else
          odd.tot--;
      }
      even.tot += x / 2;
      odd.tot += x / 2;
      if (abs(x) & 1) {
        tmp = odd;
        odd = even;
        even = tmp;
      }
    } else {
      tmp = odd;
      odd = even;
      even = tmp;
    }
  }
  odd.tot %= n / 2;
  if (odd.tot < 0) odd.tot = n / 2 - abs(odd.tot);
  even.tot %= n / 2;
  if (even.tot < 0) even.tot = n / 2 - abs(even.tot);
  while (odd.tot) {
    odd.s -= 2;
    if (odd.s <= 0) odd.s += n;
    odd.tot--;
  }
  while (even.tot) {
    even.s -= 2;
    if (even.s <= 0) even.s += n;
    even.tot--;
  }
  if (odd.flag == 1) {
    int now1 = odd.s, now2 = even.s;
    ;
    for (int i = 1; i <= n / 2; i++, now1 += 2, now2 += 2) {
      if (now1 > n) now1 -= n;
      if (now2 > n) now2 -= n;
      printf("%d %d ", now1, now2);
    }
  } else {
    int now1 = odd.s, now2 = even.s;
    for (int i = 1; i <= n / 2; i++, now1 += 2, now2 += 2) {
      if (now1 > n) now1 -= n;
      if (now2 > n) now2 -= n;
      printf("%d %d ", now1, now2);
    }
  }
  return 0;
}
