#include <bits/stdc++.h>
using namespace std;
vector<int> data[2];
int n, q, t, x, pos[2];
void output() {
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 2; ++j)
      printf("%d ", data[j][(i - pos[j] + n) % n] + 1);
  printf("\n");
}
int main() {
  scanf("%d%d", &n, &q), n /= 2;
  for (int i = 0; i < n; ++i)
    for (int j = 0; j < 2; ++j) data[j].push_back(2 * i + j);
  for (int i = 0; i < q; ++i) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      if (x < 0) x += 2 * n;
      for (int j = 0; j < 2; ++j) pos[j] = (pos[j] + (x / 2)) % n;
      if (x % 2 == 1) {
        data[0].swap(data[1]);
        swap(pos[0], pos[1]);
        pos[0] = (pos[0] + 1) % n;
      }
    } else {
      data[0].swap(data[1]);
      swap(pos[0], pos[1]);
    }
  }
  output();
  return 0;
}
