#include <bits/stdc++.h>
using namespace std;
long long i, j, k, m, M, n, s, co, ans, len, T, r, t, pos;
int op, pos1 = 1, pos2 = 2;
inline void func() {
  int t1, t2;
  if (s != 0) {
    if (s < 0) s = n + s;
    s %= n;
    if (s % 2 == 0) {
      pos1 -= s, pos1 %= n;
      if (pos1 < 0) pos1 = n + pos1;
      if (pos1 == 0) pos1 = n;
      pos2 -= s, pos2 %= n;
      if (pos2 < 0) pos2 = n + pos2;
      if (pos2 == 0) pos2 = n;
    } else {
      t1 = pos1, t2 = pos2;
      pos1 = t2 - s - 1, pos1 %= n;
      if (pos1 < 0) pos1 = n + pos1;
      if (pos1 == 0) pos1 = n;
      pos2 = t1 - s + 1, pos2 %= n;
      if (pos2 < 0) pos2 = n + pos2;
      if (pos2 == 0) pos2 = n;
    }
    s = 0;
  }
}
int main() {
  scanf("%lld %lld", &n, &m);
  for (i = 1; i <= m; i++) {
    scanf("%d", &op);
    if (op == 1) {
      scanf("%lld", &t);
      s += t;
    } else {
      func();
      swap(pos1, pos2);
    }
  }
  func();
  for (i = 1; i <= n / 2; i++) {
    printf("%d %d ", pos1, pos2);
    pos1 += 2, pos2 += 2;
    if (pos1 > n) pos1 %= n;
    if (pos2 > n) pos2 %= n;
    if (pos1 == 0) pos1 = n;
    if (pos2 == 0) pos2 = n;
  }
  return 0;
}
