#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 5;
int n, q;
int a, b, x[N];
int main() {
  ios_base::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> q;
  a = 0, b = 1;
  for (int i = 1; i <= q; ++i) {
    int t;
    cin >> t;
    if (t == 1) {
      int x;
      cin >> x;
      a = (a + n + x) % n;
      b = (b + n + x) % n;
    } else {
      if (a & 1) {
        a--;
        b++;
      } else {
        a++;
        b--;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    if (i % 2 == 0) {
      x[(a + i) % n] = i;
    } else
      x[(b + i - 1) % n] = i;
  }
  for (int i = 0; i < n; ++i) cout << x[i] + 1 << ' ';
}
