#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 even_s = 0;
  int odd_s = 0;
  int o_e_pos = 0;
  int half = n / 2;
  vector<int> evens(half);
  vector<int> odds(half);
  for (int i = 0; i < half; ++i) {
    evens[i] = i * 2 + 2;
    odds[i] = i * 2 + 1;
  }
  for (int j = 0; j < q; ++j) {
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d", &move);
      int r_m = move / 2;
      if (o_e_pos == 1) {
        int r_m2 = (move + (move > 0 ? 1 : -1)) / 2;
        if (move > 0) {
          even_s = ((even_s - r_m) + half) % half;
          odd_s = ((odd_s - r_m2) + half) % half;
        } else {
          even_s = ((even_s - r_m2) + half) % half;
          odd_s = ((odd_s - r_m) + half) % half;
        }
      } else {
        int r_m2 = (move + (move > 0 ? 1 : -1)) / 2;
        if (move > 0) {
          odd_s = ((odd_s - r_m) + half) % half;
          even_s = ((even_s - r_m2) + half) % half;
        } else {
          odd_s = ((odd_s - r_m2) + half) % half;
          even_s = ((even_s - r_m) + half) % half;
        }
      }
      if (move % 2 != 0) o_e_pos = (o_e_pos + 1) % 2;
    } else {
      o_e_pos = (o_e_pos + 1) % 2;
    }
  }
  for (int i = 0; i < half; ++i) {
    if (o_e_pos == 0) {
      printf("%d %d ", odds[(odd_s + i) % half], evens[(even_s + i) % half]);
    } else {
      printf("%d %d ", evens[(even_s + i) % half], odds[(odd_s + i) % half]);
    }
  }
  return 0;
}
