#include <bits/stdc++.h>
using namespace std;
const double pi = acos(-1.0);
double eps = 0.000001;
int n, q;
int bb[1000005];
inline int change(int x, int d) {
  int res = ((x + d) % n + n) % n;
  if (res == 0) res = n;
  return res;
}
int main() {
  cin >> n >> q;
  int i, j, x;
  int id1 = 1;
  int id2 = 2;
  for (i = 1; i <= q; i++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      cin >> x;
      id1 = change(id1, x);
      id2 = change(id2, x);
    } else {
      if (id1 % 2) {
        id1 = change(id1, 1);
        id2 = change(id2, -1);
      } else {
        id1 = change(id1, -1);
        id2 = change(id2, 1);
      }
    }
  }
  for (i = 2; i <= n; i += 2) {
    bb[id2] = i;
    id2 = change(id2, 2);
  }
  for (i = 1; i <= n - 1; i += 2) {
    bb[id1] = i;
    id1 = change(id1, 2);
  }
  for (i = 1; i <= n; i++) printf("%d ", bb[i]);
  printf("\n");
  return 0;
}
