#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  int x = 0, y = 1;
  for (int _n(q), i(0); i < _n; i++) {
    int t, by = 0;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &by);
      x = (x + by + n) % n;
      y = (y + by + n) % n;
    } else {
      x ^= 1;
      y ^= 1;
    }
  }
  vector<int> r(n);
  for (int i = 0; i < n; i += 2) {
    int j = (i + x + n) % n;
    r[j] = i + 1;
  }
  for (int i = 0; i < n; i += 2) {
    int j = (i + y + n) % n;
    r[j] = i + 2;
  }
  for (int _n(n), i(0); i < _n; i++) printf("%d ", r[i]);
  printf("\n");
  return 0;
}
