#include <bits/stdc++.h>
using namespace std;
int n, q;
int main() {
  cin >> n >> q;
  int xx1 = 0, xx2 = 0;
  while (q--) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      xx1 = (n + xx1 - x) % n;
      xx2 = (n + xx2 - x) % n;
      if (x % 2) swap(xx1, xx2);
    } else {
      xx1 = (xx1 + n - 1) % n;
      xx2 = (xx2 + n + 1) % n;
      swap(xx1, xx2);
    }
  }
  int i;
  for (i = 1; i < n; i++) {
    if (i % 2)
      cout << (xx1 + i - 1 + n) % n + 1 << " ";
    else
      cout << (xx2 + i - 1 + n) % n + 1 << " ";
  }
  if (i % 2)
    cout << (xx1 + i - 1 + n) % n + 1 << endl;
  else
    cout << (xx2 + i - 1 + n) % n + 1 << endl;
  return 0;
}
