#include <bits/stdc++.h>
using namespace std;
int ans[1010101] = {0};
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  int p1 = 0, p2 = 1;
  while (q--) {
    int typ;
    scanf("%d ", &typ);
    if (typ == 1) {
      int x;
      scanf("%d ", &x);
      p1 += x + n;
      p2 += x + n;
      p1 %= n;
      p2 %= n;
    } else if (typ == 2) {
      if (p1 & 1) {
        p1--;
        p2++;
        p1 = (p1 + n) % n;
        p2 = (p2 + n) % n;
      } else {
        p1++;
        p2--;
        p1 = (p1 + n) % n;
        p2 = (p2 + n) % n;
      }
    }
  }
  int c = 1;
  while (ans[p1] == 0) {
    ans[p1] = c;
    c += 2;
    p1 += 2;
    p1 %= n;
  }
  c = 2;
  while (ans[p2] == 0) {
    ans[p2] = c;
    c += 2;
    p2 += 2;
    p2 %= n;
  }
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  printf("\n");
  return 0;
}
