#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
long long n, q, start1 = 0, start2 = 1;
long long ans[N];
long long offset[2] = {+1, -1};
int32_t main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  cin >> n >> q;
  for (long long i = 1; i <= q; i++) {
    long long type;
    cin >> type;
    if (type == 1) {
      long long x;
      cin >> x;
      start1 += (x + n);
      start1 %= n;
      start2 += (x + n);
      start2 %= n;
    } else {
      start1 += offset[start1 % 2];
      start2 += offset[start2 % 2];
    }
  }
  for (long long i = 1; i <= n; i += 2) {
    ans[start1] = i;
    start1 += 2;
    start1 %= n;
  }
  for (long long i = 2; i <= n; i += 2) {
    ans[start2] = i;
    start2 += 2;
    start2 %= n;
  }
  for (long long i = 0; i < n; i++) cout << ans[i] << " ";
  return 0;
}
