#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 50;
int n, x, q;
int ans[maxn];
int main() {
  while (scanf("%d %d", &n, &q) != EOF) {
    int t;
    int pos1 = 0, pos2 = 1;
    for (int i = 0; i < q; i++) {
      scanf("%d", &x);
      if (x == 2) {
        if (pos1 & 1)
          pos1 = (pos1 - 1 + n) % n;
        else
          pos1 = (pos1 + 1 + n) % n;
        if (pos2 & 1)
          pos2 = (pos2 - 1 + n) % n;
        else
          pos2 = (pos2 + 1 + n) % n;
      } else {
        scanf("%d", &t);
        pos1 = (pos1 + t + n) % n;
        pos2 = (pos2 + t + n) % n;
      }
    }
    int add1 = pos1, add2 = (pos2 - 1 + n) % n;
    for (int i = 0; i < n; i++) {
      if (i & 1)
        ans[(i + add2) % n + 1] = i + 1;
      else
        ans[(i + add1) % n + 1] = i + 1;
    }
    for (int i = 1; i < n; i++) printf("%d ", ans[i]);
    printf("%d\n", ans[n]);
  }
  return 0;
}
