#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 5;
int n, q;
int ans[maxn];
int main() {
  scanf("%d%d", &n, &q);
  int a = 0, b = 1, cmd;
  for (int i = 1; i <= q; i++) {
    scanf("%d", &cmd);
    if (cmd == 1) {
      int x;
      scanf("%d", &x);
      a = (a + n + x) % n;
      b = (b + n + x) % n;
    } else {
      if ((a & 1) == 0) {
        a = (a + 1) % n;
        b = (b - 1 + n) % n;
      } else {
        a = (a - 1 + n) % n;
        b = (b + 1) % n;
      }
    }
  }
  for (int i = 1; i <= n; i += 2) {
    ans[a] = i;
    a = (a + 2) % n;
  }
  for (int i = 2; i <= n; i += 2) {
    ans[b] = i;
    b = (b + 2) % n;
  }
  for (int i = 0; i < n; i++) printf("%d%c", ans[i], i + 1 == n ? '\n' : ' ');
  return 0;
}
