#include <bits/stdc++.h>
using namespace std;
const long long INF = ((long long)1 << 59);
int main() {
  std::ios::sync_with_stdio(false);
  int n, q, op;
  int move;
  scanf("%d%d", &n, &q);
  int odd_s = 0;
  int even_s = 1;
  int o_e_pos = 0;
  vector<int> res(n);
  for (int j = 0; j < q; j++) {
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d", &move);
      even_s = ((even_s + move) + n) % n;
      odd_s = ((odd_s + move) + n) % n;
    } else {
      if (odd_s % 2 == 0) {
        odd_s = (odd_s + 1) % n;
        even_s = ((even_s - 1) + n) % n;
      } else {
        odd_s = ((odd_s - 1) + n) % n;
        even_s = (even_s + 1) % n;
      }
    }
  }
  int s_o = 1;
  int s_e = 2;
  for (int i = 0; i < n; i += 2) {
    res[(odd_s + i) % n] = s_o;
    res[(even_s + i) % n] = s_e;
    s_o += 2;
    s_e += 2;
  }
  printf("%d", res[0]);
  for (int i = 1; i < n; ++i) {
    printf(" %d", res[i]);
  }
  return 0;
}
