#include <bits/stdc++.h>
using namespace std;
const int M = 1e6 + 10;
int n, q, one = 1, two = 2, ans[M];
int cng(int x) {
  if (x & 1)
    x++, x %= n;
  else
    x--, x += n, x %= n;
  return x;
}
int main() {
  cin >> n >> q;
  while (q--) {
    int t;
    scanf("%d", &t);
    if (t == 2) {
      one = cng(one);
      two = cng(two);
    } else {
      int k;
      scanf("%d", &k);
      one += k, one += n, one %= n;
      two += k, two += n, two %= n;
    }
  }
  for (int i = 0; i < n / 2; i++) ans[(one + i * 2) % n] = 2 * i + 1;
  for (int i = 0; i < n / 2; i++) ans[(two + i * 2) % n] = 2 * (i + 1);
  swap(ans[n], ans[0]);
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
