#include <bits/stdc++.h>
using namespace std;
const int MAXN = 2000005;
const int HUJ = 5002;
int ans[MAXN];
int main() {
  int n, q;
  scanf("%d", &n);
  scanf("%d", &q);
  int a = 1, b = 2;
  for (int i = 0; i < q; i++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      a += x;
      b += x;
      if (a > n) a -= n;
      if (b > n) b -= n;
      if (a < 1) a += n;
      if (b < 1) b += n;
    } else {
      if (a % 2 == 0)
        a -= 1;
      else
        a += 1;
      if (b % 2 == 0)
        b -= 1;
      else
        b += 1;
      if (a > n) a -= n;
      if (b > n) b -= n;
      if (a < 1) a += n;
      if (b < 1) b += n;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1)
      ans[(a + i - 1) % n] = i;
    else
      ans[(b + i - 2) % n] = i;
  }
  for (int i = 1; i < n; i++) printf("%d ", ans[i]);
  printf("%d ", ans[0]);
  return 0;
}
