#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
int mod = 1e9 + 7;
int ans[1000003];
signed main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  cin >> n >> q;
  int i, j, o = 1, t = 2;
  while (q--) {
    cin >> i;
    if (i == 1) {
      cin >> j;
      if (j < 0) j += 2 * n;
      o = (o + j + n - 1) % n + 1;
      t = (t + j + n - 1) % n + 1;
    } else {
      if (o % 2)
        ++o;
      else
        --o;
      if (t % 2)
        ++t;
      else
        --t;
      if (!o) o = n;
      if (!t) t = n;
    }
  }
  j = 1;
  for (i = o; i <= n; i += 2) ans[i] = j, j += 2;
  if (i == n + 1)
    i = 1;
  else
    i = 2;
  for (; i < o; i += 2) ans[i] = j, j += 2;
  j = 2;
  for (i = t; i <= n; i += 2) ans[i] = j, j += 2;
  if (i == n + 1)
    i = 1;
  else
    i = 2;
  for (; i < t; i += 2) ans[i] = j, j += 2;
  for (i = 1; i <= n; ++i) cout << ans[i] << ' ';
  return 0;
}
