#include <bits/stdc++.h>
using namespace std;
const int N = 2e6 + 7;
const long long INF = 1e9 + 7;
const long double EPS = 1e-9;
const long long P = 485437;
const int C = 2016;
const int LOG = 63;
int a[N];
int move_it(int x, int n, int typ, int e) {
  if (typ == 2) {
    if (x % 2 == 0)
      return x + 1;
    else
      return x - 1;
  }
  return (x + e + n) % n;
}
int main() {
  int n, q, t;
  scanf("%d%d", &n, &q);
  int f = 0, s = 1;
  for (int i = 0; i < q; i++) {
    int e;
    scanf("%d", &t);
    if (t == 1) scanf("%d", &e);
    f = move_it(f, n, t, e);
    s = move_it(s, n, t, e);
  }
  int v = 1;
  for (int i = f; i < n; i += 2) a[i] = v, v += 2;
  for (int i = f % 2; i < f; i += 2) a[i] = v, v += 2;
  v = 2;
  for (int i = s; i < n; i += 2) a[i] = v, v += 2;
  for (int i = s % 2; i < s; i += 2) a[i] = v, v += 2;
  for (int i = 0; i < n; i++) printf("%d ", a[i]);
  return 0;
}
