#include <bits/stdc++.h>
const int Mod = (int)1e9 + 7;
const int MX = 1073741822;
const long long MXLL = 9223372036854775807;
const int Sz = 1110111;
using namespace std;
inline void Read_rap() {
  ios_base ::sync_with_stdio(0);
  cin.tie(0);
}
int f, s;
int a[Sz];
int n, q;
int main() {
  scanf("%d %d", &n, &q);
  f = 0, s = 1;
  for (int i = 1; i <= q; i++) {
    int tp;
    scanf("%d", &tp);
    if (tp == 1) {
      int x;
      scanf("%d", &x);
      f = (f + x + n) % n;
      s = (s + x + n) % n;
    } else {
      f = f + ((f & 1) ? -1 : +1) + n;
      s = s + ((f & 1) ? -1 : +1) + n;
      f %= n;
      s %= n;
    }
  }
  for (int i = 0; i < n / 2; i++) {
    a[(f + 2 * i) % n + 1] = 2 * i + 1;
  }
  for (int i = 1; i <= n / 2; i++) {
    a[(s + 2 * (i - 1)) % n + 1] = 2 * i;
  }
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
  return 0;
}
