#include <bits/stdc++.h>
using namespace std;
int n;
int ans[1000007];
int conj(int x) {
  if (x % 2 == 0)
    return x + 1;
  else
    return x - 1;
}
int mov(int x, int d) {
  if (d > 0) {
    return (x + d) % n;
  } else {
    x = x + d;
    if (x < 0) x += n;
    return x;
  }
}
int main() {
  int q, i, t, x;
  cin >> n >> q;
  int pos1 = 0;
  int pos2 = 1;
  for (i = 0; i < q; i++) {
    scanf("%d", &t);
    if (t == 2) {
      pos1 = conj(pos1);
      pos2 = conj(pos2);
    } else {
      scanf("%d", &x);
      pos1 = mov(pos1, x);
      pos2 = mov(pos2, x);
    }
  }
  int v1 = 1;
  int v2 = 2;
  for (i = 0; i < n / 2; i++) {
    ans[pos1] = v1;
    ans[pos2] = v2;
    pos1 += 2;
    v1 += 2;
    pos2 += 2;
    v2 += 2;
    if (pos1 >= n) pos1 -= n;
    if (pos2 >= n) pos2 -= n;
  }
  for (i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
  printf("\n");
  return 0;
}
