#include <bits/stdc++.h>
using namespace std;
int n, q, t;
int a, b, x;
int arr[1000100];
int main() {
  cin >> n >> q;
  a = 0;
  b = 1;
  while (q--) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      a = (a + n + x) % n;
      b = (b + n + x) % n;
    } else {
      a ^= 1;
      b ^= 1;
    }
  }
  for (int i = 0; i < n; i++) {
    arr[(((i & 1) ? b : a) + i - (i & 1)) % n] = i;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", arr[i] + 1);
  }
  cout << endl;
  return 0;
}
