#include <bits/stdc++.h>
const int INF = 2147483647;
const int MOD = 1000000007;
const long long INF64 = 9223372036854775807;
const long double EPS = 1e-7;
using namespace std;
int ans1[1000001], ans2[1000001];
int main() {
  int n, q, t, val;
  scanf("%d%d", &n, &q);
  int q0 = 0, q1 = 0;
  for (int i = 0; i < q; i++) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &val);
      val %= n;
      q1 = (q1 + val + n) % n;
      q0 = (q0 + val + n) % n;
    } else {
      if (q0 % 2 == 0)
        q0 = (q0 + 1) % n;
      else
        q0 = (q0 - 1 + n) % n;
      if (q1 % 2 == 1)
        q1 = (q1 + 1) % n;
      else
        q1 = (q1 - 1 + n) % n;
    }
  }
  for (int i = 0; i < n; i++) ans1[i] = (i + (i % 2 == 0 ? q0 : q1)) % n;
  for (int i = 0; i < n; i++) ans2[ans1[i]] = i + 1;
  for (int i = 0; i < n; i++) printf("%d ", ans2[i]);
  printf("\n");
  return 0;
}
