#include <bits/stdc++.h>
int n, a[1000001];
int read() {
  char c, f = 0;
  while ((c = getchar()) < 48 || c > 57) {
    if (c == '-') f = 1;
  }
  int x;
  if (!f) {
    x = c - 48;
    while ((c = getchar()) > 47 && c < 58) x = x * 10 + (c - 48);
  } else {
    x = 48 - c;
    while ((c = getchar()) > 47 && c < 58) x = x * 10 - (c - 48);
  }
  return x;
}
void write(int x) {
  if (x < 10) {
    putchar(x + 48);
    return;
  }
  write(x / 10);
  putchar(x % 10 + 48);
}
int f1(int x, int y) {
  int z = x + y;
  if (z >= n)
    z -= n;
  else if (z < 0)
    z += n;
  return z;
}
int f2(int x) {
  if (x & 1) {
    if (--x < 0) x += n;
  } else {
    if (++x >= n) x -= n;
  }
  return x;
}
int main() {
  int q, p1, p2, o, x, i;
  n = read(), q = read();
  p1 = 0, p2 = 1;
  while (q--) {
    o = read();
    if (o == 1) {
      x = read();
      p1 = f1(p1, x);
      p2 = f1(p2, x);
    } else {
      p1 = f2(p1), p2 = f2(p2);
    }
  }
  for (x = 1; x <= n; x += 2) {
    a[p1] = x;
    p1 += 2;
    if (p1 >= n) p1 -= n;
  }
  for (x = 2; x <= n; x += 2) {
    a[p2] = x;
    p2 += 2;
    if (p2 >= n) p2 -= n;
  }
  for (i = 0; i < n; i++) write(a[i]), putchar(32);
  return 0;
}
