#include <bits/stdc++.h>
using namespace std;
const long double INF = INFINITY;
long long n, q;
long long z, x;
long long k = 0, c = 0, nc = 0, two = 0;
long long ans[2000000];
int solve() {
  scanf("%I64d%I64d", &n, &q);
  for (int i = 0; i < q; i++) {
    scanf("%I64d", &z);
    if (z == 2) {
      if ((k + two) % 2 == 0)
        c--, nc++;
      else
        c++, nc--;
      two++;
      continue;
    } else {
      scanf("%I64d", &x);
      k += x;
    }
  }
  for (int i = 1; i <= n; i++) {
    long long a = i;
    a += k;
    if (i % 2 == 1)
      a += nc;
    else
      a += c;
    if (a == 0) a = n;
    if (a > 0) {
      if (a % n)
        a %= n;
      else
        a = n;
    }
    if (a < 0) {
      long long b = abs(a) % n;
      a = n - b;
    }
    ans[a] = i;
  }
  for (int i = 1; i <= n; i++) printf("%I64d ", ans[i]);
  return 0;
}
int main() {
  solve();
  return 0;
}
