#include <bits/stdc++.h>
using namespace std;
long long a[1000006];
int main() {
  long long n, k, f0 = 2, x, w = 0, f1 = 1, d0 = -1, d1 = 1;
  scanf("%lld%lld", &n, &k);
  for (long long i = 1; i <= n; i++) {
    a[i] = i;
  }
  while (k--) {
    scanf("%lld", &x);
    if (x == 1) {
      scanf("%lld", &w);
      f0 = f0 + w;
      f1 = f1 + w;
      if (abs(w) % 2 == 1) {
        d0 = -d0;
        d1 = -d1;
      }
    } else {
      f0 += d0;
      f1 += d1;
      d0 = -d0;
      d1 = -d1;
    }
  }
  while (f0 < 1) {
    f0 += n;
  }
  while (f0 > n) {
    f0 -= n;
  }
  while (f1 < 1) {
    f1 += n;
  }
  while (f1 > n) {
    f1 -= n;
  }
  long long x0 = 2, x1 = 1;
  while (f1 > 2) {
    f1 -= 2;
    x1 -= 2;
  }
  while (f0 > 2) {
    f0 -= 2;
    x0 -= 2;
  }
  while (x1 < 1) {
    x1 += n;
  }
  while (x0 < 1) {
    x0 += n;
  }
  for (long long i = 1; i <= n; i++) {
    if (f0 == i) {
      printf("%lld ", x0);
      f0 += 2;
      x0 += 2;
      if (x0 > n) x0 -= n;
    } else {
      printf("%lld ", x1);
      f1 += 2;
      x1 += 2;
      if (x1 > n) x1 -= n;
    }
  }
  return 0;
}
