#include <bits/stdc++.h>
using namespace std;
int n, q, a, b, cnt, op, x, num[1000005];
int main() {
  scanf("%d%d", &n, &q);
  a = 0, b = 1;
  while (q--) {
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d", &x);
      a = (a + x + n) % n;
      b = (b + x + n) % n;
    } else {
      if (a % 2)
        cnt = -1;
      else
        cnt = 1;
      a += cnt;
      b -= cnt;
    }
  }
  for (int i = 0; i < n / 2; i++) {
    num[(a + i * 2) % n] = i * 2 + 1;
    num[(b + i * 2) % n] = i * 2 + 2;
  }
  for (int i = 0; i < n; i++) {
    if (i != n - 1)
      printf("%d ", num[i]);
    else
      printf("%d\n", num[i]);
  }
  return 0;
}
