#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  int c[q], x[q];
  int odd = 0, even = 0;
  for (int i = 0; i < q; ++i) {
    scanf("%d", c + i);
    if (c[i] == 1) {
      scanf("%d", x + i);
      if (x[i] % 2) swap(odd, even);
      odd -= x[i];
      even -= x[i];
    } else {
      int oodd = odd, oeven = even;
      odd = oeven + 1;
      even = oodd - 1;
    }
    if (odd >= n) odd -= n;
    if (odd < 0) odd += n;
    if (even >= n) even -= n;
    if (even < 0) even += n;
  }
  for (int i = 0; i < n; ++i) {
    int delta = (i % 2) ? even : odd;
    int ind = i + delta;
    if (ind < 0) ind += n;
    if (ind >= n) ind -= n;
    printf("%d ", ind + 1);
  }
  return 0;
}
