#include <bits/stdc++.h>
using namespace std;
int n, q;
int bb[1000005];
int main() {
  scanf("%d%d", &n, &q);
  int a = 0;
  int b = 1;
  while (q--) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int step;
      scanf("%d", &step);
      a = (a + n + step) % n;
      b = (b + n + step) % n;
    } else if (t == 2) {
      if (a % 2 == 0) {
        a = a + 1;
        b -= 1;
      } else {
        a -= 1;
        b += 1;
      }
    }
  }
  int k = 1;
  int j = a;
  for (int i = 0; i < n / 2; i++) {
    bb[j % n] = k;
    k += 2;
    j += 2;
  }
  k = 2;
  j = b;
  for (int i = 0; i < n / 2; i++) {
    bb[j % n] = k;
    k += 2;
    j += 2;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", bb[i]);
  }
  return 0;
}
