#include <bits/stdc++.h>
using namespace std;
int n, q;
int ans[1000 * 1000 + 10];
int main() {
  ios::sync_with_stdio(false);
  scanf("%d%d", &n, &q);
  int p1 = 1, p2 = 2;
  int t;
  int x;
  for (int i = 0; i < q; i++) {
    scanf("%d", &t);
    if (t == 2) {
      if (p1 & 1)
        p1++;
      else
        p1--;
      if (p2 & 1)
        p2++;
      else
        p2--;
    } else {
      scanf("%d", &x);
      p1 += x;
      p2 += x;
      if (p1 <= 0) p1 += n;
      if (p1 > n) p1 -= n;
      if (p2 <= 0) p2 += n;
      if (p2 > n) p2 -= n;
    }
  }
  vector<int> ans(n + 1);
  p2--;
  for (int i = 1; i <= n; i++) {
    if (i & 1)
      ans[p1] = i;
    else
      ans[p2] = i;
    p1++, p2++;
    if (p1 > n) p1 -= n;
    if (p2 > n) p2 -= n;
  }
  for (int i = 1; i <= n; i++) printf("%d ", ans[i]);
  return 0;
}
