#include <bits/stdc++.h>
using namespace std;
long long int parent[200001];
long long int ranks[200001];
set<long long int> roots;
set<long long int> se;
void solve() {
  long long int i, j, k, l, m, n, o, p, q, r;
  cin >> n >> k;
  p = 0;
  q = 0;
  j = 1;
  l = 2;
  long long int d = 0;
  for (i = 1; i <= k; i++) {
    cin >> m;
    if (m == 1) {
      cin >> o;
      p += (o + n) % n;
      q += (o + n) % n;
    } else {
      if (p % 2) {
        p -= 1;
        p += n;
        p %= n;
        q += 1;
        q += n;
        q %= n;
      } else {
        p += 1;
        p %= n;
        q -= 1;
        q += n;
        q %= n;
      }
    }
  }
  vector<long long int> v(n + 1);
  for (i = 0; i < n; i++) {
    if ((i + 1) % 2 == 1) {
      v[(i + p) % n + 1] = i + 1;
    } else {
      v[(i + q) % n + 1] = i + 1;
    }
  }
  for (i = 1; i <= n; i++) {
    cout << v[i] << " ";
  }
  cout << "\n";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  long long int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}
