#include <bits/stdc++.h>
using namespace std;
int c[1000005], d[1000005];
;
int n, q;
int main() {
  cin >> n >> q;
  int a = 0, b = 1;
  for (int i = 0; i < q; i++) {
    int x, y;
    scanf("%d", &x);
    if (x == 1) {
      scanf("%d", &y);
      a = (a + y + n) % n;
      b = (b + y + n) % n;
    } else {
      a ^= 1;
      b ^= 1;
    }
  }
  b = (b + n - 1) % n;
  for (int i = 0; i < n; i++) c[i] = i;
  for (int i = 0; i < n; i++) {
    if (i & 1)
      c[i] = (c[i] + b) % n;
    else
      c[i] = (c[i] + a) % n;
  }
  for (int i = 0; i < n; i++) {
    d[c[i]] = i;
  }
  for (int i = 0; i < n; i++) printf("%d ", d[i] + 1);
}
