#include <bits/stdc++.h>
using namespace std;
const int N = 1000010;
long long n, q, t, x;
long long mov = 0, ans[N], pos1 = 1, pos2 = 2;
void move(long long &p, int x) {
  p += x;
  if (p <= 0) p += n;
}
void swap(long long &p) {
  if ((p + mov) % 2 == 1)
    p += 1;
  else
    p -= 1;
  if (p <= 0) p += n;
}
void maintain() {
  pos1 += mov;
  pos2 += mov;
  pos1 = (pos1 % n + n) % n;
  pos2 = (pos2 % n + n) % n;
  if (pos1 == 0) pos1 = n;
  if (pos2 == 0) pos2 = n;
}
int main() {
  scanf("%I64d%I64d", &n, &q);
  for (int i = 0; i < q; ++i) {
    scanf("%I64d", &t);
    if (t == 1) {
      scanf("%I64d", &x);
      mov += x;
      mov = ((mov % n + n) % n);
    } else {
      swap(pos1);
      swap(pos2);
    }
  }
  maintain();
  ans[pos1] = 1;
  ans[pos2] = 2;
  for (int i = 1, index = pos1; i <= n / 2; ++i, index += 2)
    if (ans[index] == 0) {
      if (index > n) index %= n;
      ans[index] = 2 * i - 1;
    }
  for (int i = 1, index = pos2; i <= n / 2; ++i, index += 2)
    if (ans[index] == 0) {
      if (index > n) index %= n;
      ans[index] = 2 * i;
    }
  for (int i = 1; i <= n; ++i) printf("%lld ", ans[i]);
  printf("\n");
}
