#include <bits/stdc++.h>
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  int a = 0, b = 1;
  for (int i = 0; i < q; i++) {
    int t, x;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      x = (x + n) % n;
      a = (a + x) % n;
      b = (b + x) % n;
    } else {
      a ^= 1;
      b ^= 1;
    }
  }
  int f[2];
  f[a % 2] = (n - a) % n;
  f[b % 2] = (n - b + 1) % n;
  for (int i = 0; i < n; i++) {
    printf("%d ", (f[i & 1] + i) % n + 1);
  }
  return 0;
}
