#include <bits/stdc++.h>
int n, m, t, k;
int a[2][1000010], p[2], even = 0;
void initA() {
  for (int i = 0; 2 * i < n; i++) {
    a[0][i] = 2 * i + 1;
    a[1][i] = 2 * i + 2;
  }
}
void xorA() { even ^= 1; }
void shiftA(int k) {
  int kLessHalf = k / 2;
  int kBiggerHalf = k - kLessHalf;
  p[even] = (p[even] + n / 2 - kLessHalf) % (n / 2);
  p[even ^ 1] = (p[even ^ 1] + n / 2 - kBiggerHalf) % (n / 2);
  even ^= k % 2 != 0;
}
void outA() {
  for (int i = 0; 2 * i < n; i++)
    printf("%d %d ", a[even][(p[even] + i) % (n / 2)],
           a[even ^ 1][(p[even ^ 1] + i) % (n / 2)]);
}
int main() {
  scanf("%d%d", &n, &m);
  initA();
  for (int i = 0; i < m; i++) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &k);
      shiftA((k + n) % n);
    } else {
      xorA();
    }
  }
  outA();
}
