#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1e2 + 500;
int n, q;
int main() {
  scanf("%d %d", &n, &q);
  long long x = 0, d = 0;
  for (int qq = 0; qq < q; qq++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int y;
      scanf("%d", &y);
      x += y;
      x = (x + n) % n;
    }
    if (t == 2) {
      if ((x + d) % 2 == 0)
        d++;
      else
        d--;
      d = (d + n) % n;
    }
  }
  int answ[n];
  for (int i = 1; i <= n; i++) {
    int ind = i - 1 + x + ((i % 2 == 0) ? -d : d);
    ind = (ind + n) % n;
    answ[ind] = i;
  }
  for (auto x : answ) printf("%d ", x);
  printf("\n");
}
