#include <bits/stdc++.h>
const int kMax = 1000007;
int N, Q, t, x;
int ans[kMax];
void add(int &k, int ADD, int mod) {
  k = ((k + ADD - 1) % mod + mod) % mod + 1;
}
int main() {
  scanf("%d%d", &N, &Q);
  int one = 1, two = 2;
  while (Q--) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      add(one, x, N);
      add(two, x, N);
    } else if (t == 2) {
      if (one % 2)
        add(one, 1, N);
      else
        add(one, -1, N);
      if (two % 2)
        add(two, 1, N);
      else
        add(two, -1, N);
    }
  }
  int oneMove = one - 1, twoMove = two - 2;
  ans[one] = 1, ans[two] = 2;
  for (int i = 3, j; i <= N; ++i) {
    j = i;
    if (j % 2)
      add(j, oneMove, N);
    else
      add(j, twoMove, N);
    ans[j] = i;
  }
  for (int i = 1; i <= N; ++i) printf("%d%c", ans[i], i == N ? '\n' : ' ');
  return 0;
}
