#include <bits/stdc++.h>
using namespace std;
int n, q, one, two, ans[1001000];
void inc(int &val, int x) {
  val += x;
  if (val < 0) {
    val = n + val;
  } else {
    val %= n;
  }
}
int main() {
  scanf("%d%d", &n, &q);
  one = 0, two = 1;
  while (q--) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      inc(one, x);
      inc(two, x);
    } else {
      if (one & 1) {
        inc(one, -1);
      } else {
        inc(one, 1);
      }
      if (two & 1) {
        inc(two, -1);
      } else {
        inc(two, 1);
      }
    }
  }
  for (int i = 1, j = one;; (j += 2) %= n, i += 2) {
    if (ans[j]) break;
    ans[j] = i;
  }
  for (int i = 2, j = two;; (j += 2) %= n, i += 2) {
    if (ans[j]) break;
    ans[j] = i;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
}
