#include <bits/stdc++.h>
using namespace std;
int n, m, op, x, p[2] = {0, 1}, a[1000000];
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> m;
  while (m--) {
    cin >> op;
    if (op == 2) {
      if (p[1] & 1)
        p[0]++, p[1]--;
      else
        p[0]--, p[1]++;
    } else
      cin >> x, (p[0] += x) %= n, (p[1] += x) %= n;
  }
  for (int i = (p[0] + n) % n, j = 1; j <= n; a[i] = j, (i += 2) %= n, j += 2)
    ;
  for (int i = (p[1] + n) % n, j = 2; j <= n; a[i] = j, (i += 2) %= n, j += 2)
    ;
  for (int i = 0; i < n; i++) cout << a[i] << ' ';
  return 0;
}
