#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  int n, q;
  long long oddMen = 0, pairMen = 0, command, x, idx;
  scanf("%d %d", &n, &q);
  vector<int> pos(1100000, 0);
  while (q--) {
    scanf("%lld", &command);
    if (command & 1) {
      scanf("%lld", &x);
      oddMen += x;
      pairMen += x;
    } else {
      oddMen += (oddMen & 1LL == 1 ? -1 : 1);
      pairMen += (pairMen & 1LL == 1 ? 1 : -1);
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i & 1LL)
      idx = i + oddMen;
    else
      idx = i + pairMen;
    if (idx > n) {
      idx %= n;
    }
    if (idx < 1) {
      idx = (idx <= (-n) ? n - (idx * (-1)) % n : idx += n);
    }
    pos[idx] = i;
  }
  int flag = 0;
  for (int i = 1; i <= n; i++) {
    if (flag)
      printf(" ");
    else
      flag = 1;
    printf("%d", pos[i]);
  }
  printf("\n");
  return 0;
}
