#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q, x;
  int pos1 = 0, pos2 = 1;
  scanf("%d", &n);
  scanf("%d", &q);
  for (int i = 0; i < q; i++) {
    scanf("%d", &x);
    if (x == 1) {
      scanf("%d", &x);
      pos1 = (pos1 + x + n) % n;
      pos2 = (pos2 + x + n) % n;
    } else {
      pos1 = (pos1 & 1) ? (pos1 - 1 + n) % n : (pos1 + 1) % n;
      pos2 = (pos2 & 1) ? (pos2 - 1 + n) % n : (pos2 + 1) % n;
    }
  }
  vector<int> pos(n);
  for (int i = 0; i < n; i++) {
    if (i & 1) {
      pos[(pos2 + (i - 1)) % n] = i + 1;
    } else {
      pos[(pos1 + i) % n] = i + 1;
    }
  }
  for (int i = 0; i < n; i++) printf("%d ", pos[i]);
}
