#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
template <typename T>
ostream& operator<<(ostream& out, vector<T> v) {
  out << '{';
  for (size_t i = 0; i < v.size(); ++i) out << (i == 0 ? "" : ", ") << v[i];
  return out << '}';
}
template <typename Arg1>
void myPrint(const char* name, Arg1&& arg1) {
  std::cout << name << "=" << arg1 << std::endl;
}
template <typename Arg1, typename... Args>
void myPrint(const char* names, Arg1&& arg1, Args&&... args) {
  const char* comma = strchr(names + 1, ',');
  std::cout.write(names, comma - names) << "=" << arg1;
  myPrint(comma, args...);
}
void run();
int main() {
  if (strlen("") > 0) {
    freopen(
        ""
        ".in",
        "r", stdin);
    freopen(
        ""
        ".out",
        "w", stdout);
  }
  run();
  return 0;
}
long long n, q;
long long add[2];
void run() {
  scanf("%d%d", &n, &q);
  while (q--) {
    int t, x;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      if (x < 0) x += n;
      add[0] += x;
      add[1] += x;
    } else {
      if (add[0] % 2) {
        --add[0];
        ++add[1];
      } else {
        ++add[0];
        --add[1];
      }
    }
  }
  vector<int> a(n);
  for (int i = 0; i < n; ++i) a[((i + add[i % 2]) % n + n) % n] = i;
  for (int x : a) printf("%d ", x + 1);
  printf("\n");
}
