#include <bits/stdc++.h>
using namespace std;
int main() {
  int n;
  scanf("%d", &n);
  int cnt[2];
  cnt[0] = 0;
  cnt[1] = 0;
  int pos = 0;
  int q;
  scanf("%d", &q);
  long long int sum = 0;
  for (int i = 0; i < q; i++) {
    int det;
    scanf("%d", &det);
    if (det == 1) {
      int r;
      scanf("%d", &r);
      sum += r;
      if (r % 2) {
        pos = 1 - pos;
      }
    } else {
      cnt[pos]++;
      cnt[1 - pos]--;
      pos = 1 - pos;
    }
  }
  int A[n];
  for (int i = 0; i < n; i++) {
    long long int tmp = sum;
    tmp += cnt[i % 2];
    tmp += i;
    tmp %= n;
    if (tmp < 0) {
      tmp += n;
    }
    A[tmp] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", A[i]);
  }
  return 0;
}
