#include <bits/stdc++.h>
using namespace std;
int s[1000050];
int main() {
  int n, m;
  while (cin >> n >> m) {
    int odd = 0, even = 1, t, x;
    while (m--) {
      scanf("%d", &t);
      if (t == 1) {
        scanf("%d", &x);
        odd = (odd + x + n) % n;
        even = (even + x + n) % n;
      } else {
        if (odd % 2) {
          odd = (odd - 1 + n) % n;
          even = (even + 1 + n) % n;
        } else {
          odd = (odd + 1 + n) % n;
          even = (even - 1 + n) % n;
        }
      }
    }
    int cnt = 1;
    while (cnt < n) {
      s[odd] = cnt++;
      s[even] = cnt++;
      odd = (odd + 2 + n) % n;
      even = (even + 2 + n) % n;
    }
    for (int i = 0; i < n; i++) printf("%d ", s[i]);
    printf("\n");
  }
}
