#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:66777216")
using namespace std;
int n;
int Q;
int a[2];
const int N = 1000000 + 5;
int r[N];
int ans[N];
void solve() {
  scanf("%d%d", &n, &Q);
  a[0] = 0;
  a[1] = 1;
  int k = n / 2;
  for (int it = 1; it <= (int)(Q); ++it) {
    int ty;
    scanf("%d", &ty);
    if (ty == 1) {
      int x;
      scanf("%d", &x);
      if (x % 2 == 0) {
        a[0] = (a[0] - x + n) % n;
        a[1] = (a[1] - x + n) % n;
      } else {
        int u[2];
        u[0] = a[0];
        u[1] = a[1];
        a[0] = ((u[1] - x - 1) % n + n) % n;
        a[1] = (((u[0] - x + 1) + n) % n + n) % n;
      }
    } else {
      swap(a[0], a[1]);
    }
  }
  int cr = a[0];
  for (int i = 0; i < n; i += 2) {
    r[i] = cr;
    cr = (cr + 2) % n;
  }
  cr = a[1];
  for (int i = 1; i < n; i += 2) {
    r[i] = cr;
    cr = (cr + 2) % n;
  }
  for (int i = 0; i < (int)(n); ++i) printf("%d ", r[i] + 1);
  puts("");
}
void testgen() {
  FILE* f = fopen("input.txt", "w");
  fclose(f);
}
int main() {
  cout << fixed;
  cout.precision(13);
  cerr << fixed;
  cerr.precision(3);
  solve();
  return 0;
}
