#include <bits/stdc++.h>
int main() {
  int N, Q;
  scanf("%d%d", &N, &Q);
  int a = 1, b = 2;
  for (auto i = 0; i < Q; ++i) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      a += x;
      b += x;
    }
    if (t == 2) {
      if (a & 1)
        a++;
      else
        a--;
      if (b & 1)
        b++;
      else
        b--;
    }
    a = (a - 1) % N + 1;
    b = (b - 1) % N + 1;
  }
  int A[N];
  for (auto i = 0; i < N; ++i) {
    auto v = i & 1 ? (i + b - 2) % N : (i + a - 1) % N;
    if (v < 0) v += N;
    A[v] = i + 1;
  }
  printf("%d", A[0]);
  for (auto i = 1; i < N; ++i) printf(" %d", A[i]);
  printf("\n");
}
