#include <bits/stdc++.h>
using namespace std;
template <class T>
using v = vector<T>;
using ll = long long;
using pii = pair<int, int>;
const int MN = 1e5 + 100;
ll norm(int n, ll x) {
  x += ll(1e8) * n;
  x %= n;
  if (x == 0) x = n;
  return x;
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int n, q;
  scanf("%d %d", &n, &q);
  v<pii> cmd(q);
  for (int i = 0; i < q; ++i) {
    scanf("%d", &cmd[i].first);
    if (cmd[i].first == 1) scanf("%d", &cmd[i].second);
  }
  ll o_pos = 1;
  ll e_pos = 2;
  for (int i = 0; i < q; ++i) {
    if (cmd[i].first == 1) {
      o_pos += cmd[i].second;
      e_pos += cmd[i].second;
      o_pos = norm(n, o_pos);
      e_pos = norm(n, e_pos);
    } else {
      if (o_pos % 2 == 1)
        o_pos++;
      else
        o_pos--;
      if (e_pos % 2 == 1)
        e_pos++;
      else
        e_pos--;
      o_pos = norm(n, o_pos);
      e_pos = norm(n, e_pos);
    }
  }
  v<int> ans(n + 1);
  for (int i = 1; i <= n; ++i) {
    if (i % 2)
      ans[norm(n, i + o_pos - 1)] = i;
    else
      ans[norm(n, i + e_pos - 2)] = i;
  }
  for (int i = 1; i <= n; ++i) {
    printf("%d ", ans[i]);
  }
}
