#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q, res[2] = {};
  vector<int> jwb(1000010);
  scanf("%d %d", &n, &q);
  while (q--) {
    int t, x;
    scanf("%d", &t);
    if (t == 2) {
      x = ((res[1] & 1) << 1) - 1;
      if (x < 0) x += n;
      res[0] += x;
      x = n - x;
      if (x < 0) x += n;
      res[1] += x;
    } else {
      scanf("%d", &x);
      if (x < 0) x += n;
      res[1] += x;
      res[0] += x;
    }
    res[0] %= n;
    res[1] %= n;
  }
  for (int i = 1; i <= n; ++i) jwb[(i + res[i & 1] - 1) % n + 1] = i;
  for (int i = 1; i <= n; ++i) printf("%d ", jwb[i]);
  printf("\n");
  return 0;
}
