#include <bits/stdc++.h>
using namespace std;
long long e, o;
int v[1000004], n, q, c, x;
int main() {
  ios_base::sync_with_stdio(0);
  scanf("%d %d", &n, &q);
  while (q--) {
    scanf("%d", &c);
    if (c == 1) {
      scanf("%d", &x);
      e += x;
      o += x;
    } else {
      e = e + (!(e & 1)) - (e & 1);
      o = o + (o & 1) - (!(o & 1));
    }
  }
  for (int i = 0; i < n; i += 2) v[((i + e) % n + n) % n] = i + 1;
  for (int i = 1; i < n; i += 2) v[((i + o) % n + n) % n] = i + 1;
  printf("%d", v[0]);
  for (int i = 1; i < n; ++i) printf(" %d", v[i]);
  printf("\n");
  return 0;
}
