#include <bits/stdc++.h>
using namespace std;
int num[1000005];
int main() {
  int n, q, i, t, j, x, a = 1, b = 2;
  scanf("%d%d", &n, &q);
  for (j = 1; j <= q; j++) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      a += x;
      while (a > n) a -= n;
      while (a <= 0) a += n;
      b += x;
      while (b > n) b -= n;
      while (b <= 0) b += n;
    } else {
      if (a % 2)
        a++;
      else
        a--;
      if (b % 2)
        b++;
      else
        b--;
      if (a <= 0) a = n;
      if (a > n) a = 1;
      if (b <= 0) b = n;
      if (b > n) b = 1;
    }
  }
  int sum = 0, o = 1;
  while (sum < n / 2) {
    num[a] = o;
    a += 2;
    o += 2;
    a %= n;
    if (a == 0) a = n;
    sum++;
  }
  sum = 0, o = 2;
  while (sum < n / 2) {
    num[b] = o;
    b += 2;
    o += 2;
    b %= n;
    if (b == 0) b = n;
    sum++;
  }
  for (i = 1; i <= n; i++) {
    printf("%d ", num[i]);
  }
  printf("\n");
  return 0;
}
