#include <bits/stdc++.h>
using namespace std;
const int N = 1e6;
int ans[N + 100];
int odd, even, total;
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  for (int i = 1; i <= q; i++) {
    int type;
    scanf("%d", &type);
    if (type == 2) {
      if (total % 2) {
        odd = (odd - 1 + n) % n;
        even = (even + 1) % n;
        total = !total;
      } else {
        odd = (odd + 1) % n;
        even = (even - 1 + n) % n;
        total = !total;
      }
    } else {
      int move;
      scanf("%d", &move);
      odd = (odd + move + n) % n;
      even = (even + move + n) % n;
      total = (total + move + 2) % 2;
    }
  }
  for (int i = 0; i < n; i++) {
    if (i % 2) {
      ans[(i + even + n) % n] = i + 1;
    } else {
      ans[(i + odd + n) % n] = i + 1;
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
  printf("\n");
}
