#include <bits/stdc++.h>
using namespace std;
bool debug = 0;
int n, m, k;
int dx[4] = {0, 1, 0, -1}, dy[4] = {1, 0, -1, 0};
string direc = "RDLU";
long long ln, lk, lm;
void etp(bool f = 0) {
  puts(f ? "YES" : "NO");
  exit(0);
}
void addmod(int &x, int y, int mod) {
  x += y;
  if (x >= mod) x -= mod;
}
void et() {
  puts("-1");
  exit(0);
}
int b[1000005];
int p1 = 0, p2 = 1;
void cg(int &pos) {
  if (pos & 1)
    pos--;
  else
    pos++;
}
void fmain() {
  scanf("%d%d", &n, &m);
  for (int(i) = 0; (i) < (int)(m); (i)++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &k);
      p1 += n + k;
      p2 += n + k;
      p1 %= n;
      p2 %= n;
    } else {
      cg(p1);
      cg(p2);
    }
  }
  for (int i = 1, j = p1; i < n; i += 2) {
    b[j] = i;
    (j += 2) %= n;
  }
  for (int i = 2, j = p2; i <= n; i += 2) {
    b[j] = i;
    (j += 2) %= n;
  }
  for (int(i) = 0; (i) < (int)(n); (i)++) printf("%d ", b[i]);
}
int main() {
  fmain();
  return 0;
}
