#include <bits/stdc++.h>
using namespace std;
int ans[1000004];
int main() {
  int n, q, c, x;
  int evenPos = 0, oddPos = 1;
  cin >> n >> q;
  while (q--) {
    scanf("%d", &c);
    if (c == 1) {
      scanf("%d", &x);
      evenPos = ((evenPos + x) % n + n) % n;
      oddPos = ((oddPos + x) % n + n) % n;
    } else {
      evenPos = (evenPos ^ 1) % n;
      oddPos = (oddPos ^ 1) % n;
    }
  }
  for (int i = 0; i < n; ++i) {
    if (i & 1)
      ans[(i / 2 * 2 + oddPos) % n] = i + 1;
    else
      ans[(i / 2 * 2 + evenPos) % n] = i + 1;
  }
  cout << ans[0];
  for (int i = 1; i < n; ++i) {
    printf(" %d", ans[i]);
  }
  cout << endl;
  return 0;
}
