#include <bits/stdc++.h>
using namespace std;
using ll = long long;
const int inf = INT_MAX;
const int ninf = INT_MIN;
const int mod = 998244353;
const int N = 2e5 + 2;
int offset[2] = {+1, -1};
int main() {
  int n, q;
  scanf("%d", &n);
  scanf("%d", &q);
  int start1 = 0, start2 = 1;
  while (q--) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      start1 = (start1 + x + n) % n;
      start2 = (start2 + x + n) % n;
    } else {
      start1 += offset[start1 % 2];
      start2 += offset[start2 % 2];
    }
  }
  vector<int> ans(n + 1);
  for (int i = 1; i <= n; i += 2) {
    ans[start1] = i;
    start1 = (start1 + 2) % n;
  }
  for (int i = 2; i <= n; i += 2) {
    ans[start2] = i;
    start2 = (start2 + 2) % n;
  }
  for (int i = (int)(0); i < (int)(n); i++) {
    printf("%d ", (int)(ans[i]));
  }
  return 0;
}
