#include <bits/stdc++.h>
using namespace std;
template <typename Arg1>
void __f(const char* name, Arg1&& arg1) {
  cerr << name << " : " << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void __f(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  cerr.write(names, comma - names) << " : " << arg1 << " | ";
  __f(comma + 1, args...);
}
int ans[1000005];
int main() {
  int n, q;
  scanf("%d", &n);
  scanf("%d", &q);
  int a = 0;
  int b = 1;
  for (int i = 0; i < q; i++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      a += x;
      b += x;
      a += n;
      b += n;
      a %= n;
      b %= n;
    } else {
      a = a & 1 ? a - 1 : a + 1;
      b = b & 1 ? b - 1 : b + 1;
      a += n;
      b += n;
      a %= n;
      b %= n;
    }
  }
  int j = a, num = 1;
  for (int i = 0; i < n; i += 2) {
    ans[j] = num;
    num += 2;
    j += 2;
    j %= n;
  }
  j = b, num = 2;
  for (int i = 0; i < n; i += 2) {
    ans[j] = num;
    num += 2;
    j += 2;
    j %= n;
  }
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
