#include <bits/stdc++.h>
using namespace std;
int a, b, cur;
int ans[2000001];
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  for (int i = 0; i < q; ++i) {
    int t, x;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      if (x % 2 != 0) cur ^= 1;
      a += x, b += x;
    } else {
      if (cur == 0)
        a += 1, b -= 1;
      else
        b += 1, a -= 1;
      cur ^= 1;
    }
    a = (a + n) % n;
    b = (b + n) % n;
  }
  for (int i = 0; i < n; ++i) {
    if (i % 2 == 0)
      ans[(i + a + n) % n] = i;
    else
      ans[(i + b + n) % n] = i;
  }
  for (int i = 0; i < n; ++i) cout << ans[i] + 1 << " ";
  cout << endl;
  return 0;
}
