#include <bits/stdc++.h>
using namespace std;
const int N = 1234567;
int a[N];
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  int oddshift = 0, evenshift = 0, cureven = 0, curodd = 1;
  for (int i = 0; i < q; i++) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      oddshift += x;
      evenshift += x;
      if (x & 1) {
        curodd = (!curodd);
        cureven = (!cureven);
      }
    } else {
      if (curodd) {
        oddshift++;
        evenshift--;
      } else {
        oddshift--;
        evenshift++;
      }
      curodd = (!curodd);
      cureven = (!cureven);
    }
    oddshift += n;
    oddshift %= n;
    evenshift += n;
    evenshift %= n;
  }
  for (int i = 0; i < n; i++) {
    int foo = i;
    if ((i + 1) & 1) {
      foo += oddshift;
    } else
      foo += evenshift;
    a[(foo + n) % n] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", a[i]);
  }
  return 0;
}
