#include <bits/stdc++.h>
using namespace std;
int a[1000000];
int b[1000000];
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  int parity = 0;
  long long evenShift = 0;
  long long oddShift = 0;
  while (q--) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      evenShift += x;
      oddShift += x;
      parity ^= x & 1;
    } else {
      if (parity) {
        evenShift--;
        oddShift++;
      } else {
        evenShift++;
        oddShift--;
      }
      parity = !parity;
    }
  }
  evenShift %= n;
  oddShift %= n;
  for (int i = 0; i < n; i++) a[i] = i + 1;
  for (int i = 0; i < n; i++) {
    int j = i + (i & 1 ? oddShift : evenShift);
    if (j < 0)
      j += n;
    else if (j >= n)
      j -= n;
    b[j] = a[i];
  }
  for (int i = 0; i < n; i++) printf("%d ", b[i]);
}
