#include <bits/stdc++.h>
using namespace std;
const int mx = 1e6 + 5;
int ret[mx];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, q, a = 0, b = 1;
  cin >> n >> q;
  for (int i = 0; i < q; i++) {
    int t, x;
    cin >> t;
    if (t == 1)
      cin >> x, a = (a + n + x) % n, b = (b + n + x) % n;
    else
      a ^= 1, b ^= 1;
  }
  for (int i = 0; i < n; i++)
    if (i & 1)
      ret[(b + i - 1) % n] = i;
    else
      ret[(a + i) % n] = i;
  for (int i = 0; i < n; i++) cout << ret[i] + 1 << " ";
  return 0;
}
