#include <bits/stdc++.h>
using namespace std;
const int maxn = 1e6 + 7;
const int mod = 1e9 + 7;
const long long INF = 1e18;
int a[maxn];
void rua() {
  int n, q;
  scanf("%d%d", &n, &q);
  int ff = 0, pp = 1;
  while (q--) {
    int op;
    scanf("%d", &op);
    if (op == 2)
      ff ^= 1, pp ^= 1;
    else {
      int x;
      scanf("%d", &x);
      ff = (ff + x + n) % n;
      pp = (pp + x + n) % n;
    }
  }
  for (int i = 0; i < n; i += 2) a[(i + ff) % n] = i + 1;
  for (int i = 0; i < n; i += 2) a[(i + pp) % n] = i + 2;
  for (int i = 0; i < n; i++) printf("%d ", a[i]);
}
int main() {
  rua();
  return 0;
}
