#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 10;
int n, q;
long long a[maxn], mv[2] = {0, 1};
int main() {
  ios_base::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cin >> n >> q;
  while (q--) {
    int x;
    cin >> x;
    if (x == 2) {
      for (int i = 0; i < 2; i++)
        if (mv[i] % 2)
          mv[i] = (mv[i] - 1 + n) % n;
        else
          mv[i] = (mv[i] + 1 + n) % n;
    } else {
      long long b;
      cin >> b;
      for (int i = 0; i < 2; i++) mv[i] = (mv[i] + b + n) % n;
    }
  }
  for (int i = 0; i < n; i += 2) {
    a[(mv[0] + i) % n] = i + 1;
    a[(mv[1] + i) % n] = i + 2;
  }
  for (int i = 0; i < n; i++) cout << a[i] << " ";
  cout << "\n";
  return 0;
}
