#include <bits/stdc++.h>
using namespace std;
long long MOD = 1000000007;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  int n, q;
  cin >> n >> q;
  int ans[2000000];
  int p0 = 0, p1 = 1;
  int d[2];
  for (int i = 0; i < q; i++) {
    int t, x;
    cin >> t;
    if (t == 1) {
      cin >> x;
      p0 = (p0 + x + n) % n;
      p1 = (p1 + x + n) % n;
    }
    if (t == 2) {
      p0 = p0 ^ (1);
      p1 = p1 ^ 1;
    }
  }
  d[0] = p0;
  d[1] = (p1 - 1 + n) % n;
  for (int i = 0; i < n; i++) {
    ans[(i + d[i % 2]) % n] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    cout << ans[i] << " ";
  }
  return 0;
}
