#include <bits/stdc++.h>
using namespace std;
void shift(int v, vector<int> &res) {
  int n = res.size();
  vector<int> tmp(n);
  for (int i = 0; i < n; i++) {
    tmp[(((i + v) % n) + n) % n] = res[i];
  }
  res = tmp;
}
int Ceil(int x) {
  if (x < 0) return x / 2 - bool(x % 2);
  return (x + 1) / 2;
}
int main() {
  int n, q;
  while (cin >> n >> q) {
    vector<int> odd(n / 2), ev(n / 2);
    for (int i = 0; i < n / 2; i++) odd[i] = 2 * i + 1, ev[i] = 2 * (i + 1);
    bool oddFirst = 1;
    int evShft = 0, odShft = 0;
    int sum = 0;
    while (q--) {
      int t;
      scanf("%d", &t);
      ;
      if (t == 2)
        oddFirst = !oddFirst;
      else {
        int x;
        scanf("%d", &x);
        ;
        if (oddFirst == x > 0) {
          evShft += Ceil(x);
          odShft += x / 2;
          evShft %= (n / 2);
          odShft %= (n / 2);
        } else {
          evShft += x / 2;
          odShft += Ceil(x);
          evShft %= (n / 2);
          odShft %= (n / 2);
        }
        if (x % 2) oddFirst = !oddFirst;
      }
    }
    shift(odShft, odd);
    shift(evShft, ev);
    if (sum % 2) oddFirst = !oddFirst;
    vector<int> res(n);
    for (int i = 0; i < n / 2; i++) {
      if (oddFirst) {
        res[i * 2] = odd[i];
        res[i * 2 + 1] = ev[i];
      } else {
        res[i * 2] = ev[i];
        res[i * 2 + 1] = odd[i];
      }
    }
    for (int i = 0; i < n; i++) cout << res[i] << ' ';
    cout << endl;
  }
  return 0;
}
