#include <bits/stdc++.h>
using namespace std;
int A[1000005];
int main() {
  int n, q, type, x, i;
  long long dist = 0, odd = 0, even = 0, k;
  bool flag = true;
  scanf("%d%d", &n, &q);
  while (q--) {
    scanf("%d", &type);
    if (type == 1) {
      scanf("%d", &x);
      dist += x;
      if (x % 2) flag = !flag;
    } else {
      if (flag)
        even++, odd--;
      else
        even--, odd++;
      flag = !flag;
    }
  }
  for (i = 0; i < n; i++) {
    k = i + dist;
    if (i % 2 == 0)
      k += even;
    else
      k += odd;
    if (k < 0) k = n - ((-k) % n);
    k = k % n;
    A[k] = i + 1;
  }
  for (i = 0; i < n; i++) printf("%d ", A[i]);
  return 0;
}
