#include <bits/stdc++.h>
using namespace std;
const int INF = 0x3f3f3f3f;
const long long INFF = 1e18;
const double pi = 3.141592653589793;
const double inf = 1e18;
const double eps = 1e-9;
const long long mod = 1e9 + 7;
const int maxmat = 10;
inline int RI() {
  int ret = 0;
  char tmp;
  while (!isdigit(tmp = getchar()))
    ;
  do {
    ret = (ret << 3) + (ret << 1) + tmp - '0';
  } while (isdigit(tmp = getchar()));
  return ret;
}
const int MAX = 1e6 + 5;
int a[MAX];
int main(int argc, char const *argv[]) {
  int N, q, p0 = 0, ch = 0, eo = 0;
  cin >> N >> q;
  for (int i = 0; i < q; i++) {
    int t, x;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      p0 = (N + p0 - x) % N;
      eo = ((N + eo - x) % N) & 1;
    } else {
      if (eo & 1)
        ch--;
      else
        ch++;
      eo ^= 1;
    }
  }
  ch %= N;
  if (ch < 0) ch += N;
  int p = ch;
  for (int i = 1; i <= N; i += 2) {
    a[p] = i;
    p = (p + 2) % N;
  }
  p = N - ch - 1;
  for (int i = N; i >= 2; i -= 2) {
    a[p] = i;
    p = (p - 2 + N) % N;
  }
  for (int i = 0; i < N; i++) printf("%d ", a[(i + p0) % N]);
  return 0;
}
