#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + ch - 48;
    ch = getchar();
  }
  return x * f;
}
int n, q, kind, x, y, v, jx, jy = 1, ans[1000005];
inline int moo(int A) { return (A + n) % n == 0 ? n : (A + n) % n; }
int main() {
  n = read();
  q = read();
  while (q--) {
    kind = read();
    if (kind == 1) {
      v = read();
      v %= n;
      x = moo(x + v);
      y = moo(y + v);
      if (v & 1) jx ^= 1, jy ^= 1;
    } else {
      if (jx)
        x = moo(x + 1);
      else
        x = moo(x - 1);
      if (jy)
        y = moo(y + 1);
      else
        y = moo(y - 1);
      jx ^= 1, jy ^= 1;
    }
  }
  for (register int i = 1; i <= n; i++) {
    if (i & 1)
      ans[moo(i + y)] = i;
    else
      ans[moo(i + x)] = i;
  }
  for (register int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
