#include <bits/stdc++.h>
using namespace std;
int n, q;
int fir = 0, sec = 1;
int mod(int x) { return (n + x) % n; }
int main() {
  scanf("%d %d", &n, &q);
  while (q-- > 0) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      if (x > 0) {
        fir = mod(fir - x / 2 * 2);
        sec = mod(sec - (x + 1) / 2 * 2);
      } else if (x < 0) {
        x = -x;
        fir = mod(fir + (x + 1) / 2 * 2);
        sec = mod(sec + x / 2 * 2);
      }
      if (x % 2 != 0) {
        swap(fir, sec);
      }
    } else {
      swap(fir, sec);
    }
  }
  for (int i = 0; i < n; i += 2) {
    printf("%d %d ", (fir + 1), (sec + 1));
    fir += 2;
    sec += 2;
    fir %= n;
    sec %= n;
  }
  puts("");
  return 0;
}
