#include <bits/stdc++.h>
using namespace std;
int n, q;
int st[2];
int ans[2000222];
int main() {
  cin >> n >> q;
  vector<int> a[2];
  for (int i = 0; i < n; i++) a[i & 1].push_back(i);
  st[0] = st[1] = 0;
  int x = 0;
  int y = 1;
  for (int i = 0; i < q; i++) {
    int type;
    scanf("%d", &type);
    if (type == 2) {
      swap(x, y);
    } else {
      int t;
      scanf("%d", &t);
      t = -t;
      t = (t + n) % n;
      if (t == 0) continue;
      st[x] = (st[x] + (t + 1) / 2) % (n / 2);
      st[y] = (st[y] + (t) / 2) % (n / 2);
      if (t % 2) swap(x, y);
    }
  }
  vector<int> p;
  for (int i = 0; i < n / 2; i++) {
    p.push_back(a[x][(st[x] + i) % (n / 2)]);
    p.push_back(a[y][(st[y] + i) % (n / 2)]);
  }
  for (int i = 0; i < n; i++) ans[i] = p[i];
  for (int i = 0; i < n; i++) {
    printf("%d", ans[i] + 1);
    if (i + 1 == n)
      puts("");
    else
      putchar(' ');
  }
  return 0;
}
