#include <bits/stdc++.h>
using namespace std;
const int mx = 1e6 + 10, inf = 1e9;
int num[mx];
int main() {
  int n, m, a, b, p0 = 0, p1 = 1;
  cin >> n >> m;
  for (int i = 1; i <= m; i++) {
    scanf("%d", &a);
    if (a == 1) {
      scanf("%d", &b);
      p0 = (p0 + b + n) % n;
      p1 = (p1 + b + n) % n;
    } else {
      if (p0 % 2) {
        p0 = (p0 - 1 + n) % n;
        p1 = (p1 + 1) % n;
      } else {
        p0 = (p0 + 1) % n;
        p1 = (p1 - 1 + n) % n;
      }
    }
  }
  int i = p0, j = p1;
  num[p0] = 1, num[p1] = 2;
  while ((i + 2) % n != p0 && (j + 2) % n != p1) {
    num[(i + 2) % n] = num[i] + 2;
    num[(j + 2) % n] = num[j] + 2;
    i = (i + 2) % n, j = (j + 2) % n;
  }
  for (i = 0; i < n; i++) {
    printf("%d ", num[i]);
  }
  return 0;
}
