#include <bits/stdc++.h>
using namespace std;
long long pos[1000005];
int ans[1000005];
long long mod(long long x, long long n) {
  long long res = ((x % n) + n) % n;
  if (res == 0) res += n;
  return res + 1 - 1;
}
int main() {
  int n, i, q, typ, x;
  scanf("%d%d", &n, &q);
  long long pos1 = 1, plus = 0, minus = 0, sum = 0;
  for (i = 1; i <= q; i++) {
    scanf("%d", &typ);
    if (typ == 1) {
      scanf("%d", &x);
      pos1 += x;
      sum += x;
    } else {
      if (pos1 & 1) {
        plus++;
        pos1++;
      } else {
        minus++;
        pos1--;
      }
    }
  }
  for (i = 1; i <= n; i++) {
    pos[i] = i + sum;
    if (i & 1) {
      pos[i] += plus - minus;
    } else {
      pos[i] += minus - plus;
    }
    if (pos[i] < 1 || pos[i] > n) {
      pos[i] = mod(pos[i], n);
    }
  }
  for (i = 1; i <= n; i++) {
    if (pos[i] >= 1 && pos[i] <= n) ans[pos[i]] = i;
  }
  for (i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  printf("\n");
  return 0;
}
