#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e6 + 9;
int a = 0, b = 1, n, q, t, x, ans[MAX];
int main() {
  cin >> n >> q;
  for (int i = 0; i < q; i++) {
    scanf("%d", &t);
    if (t == 1)
      scanf("%d", &x), a = (a + n + x) % n, b = (b + n + x) % n;
    else
      a ^= 1, b ^= 1;
  }
  for (int i = 0; i < n; i++)
    if (i & 1)
      ans[(b + i - 1) % n] = i;
    else
      ans[(a + i) % n] = i;
  for (int i = 0; i < n; i++) printf("%d ", ans[i] + 1);
}
