#include <bits/stdc++.h>
using namespace std;
int arr[2000000] = {0};
int main() {
  int n, q, t, num, pos;
  scanf("%d %d", &n, &q);
  long long ctr, net, odd, eve, isodd;
  ctr = net = odd = eve = 0;
  isodd = 1;
  while (q--) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%I64d", &num);
      net += num;
      if (isodd) {
        if (num % 2) isodd = 0;
      } else {
        if (num % 2) isodd = 1;
      }
    } else {
      if (isodd) {
        odd += 1;
        eve -= 1;
      } else {
        odd -= 1;
        eve += 1;
      }
      isodd ^= 1;
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i % 2)
      pos = (i + (net + odd) % n + n) % n;
    else
      pos = (i + (net + eve) % n + n) % n;
    if (pos == 0) pos = n;
    arr[pos] = i;
  }
  for (int i = 1; i <= n; i++) printf("%d ", arr[i]);
  return 0;
}
