#include <bits/stdc++.h>
using namespace std;
const int INF = 987654321;
int main() {
  int n, q;
  cin >> n >> q;
  int odd = 1;
  int even = 0;
  long long oddShift = 0;
  long long evenShift = 0;
  for (int i = 0; i < (q); ++i) {
    int op;
    scanf("%d", &op);
    if (op == 1) {
      cin >> op;
      oddShift += op;
      evenShift += op;
      oddShift %= n;
      evenShift %= n;
    } else {
      if ((odd + oddShift) % 2)
        oddShift++;
      else
        oddShift--;
      if ((even + evenShift) % 2)
        evenShift++;
      else
        evenShift--;
      oddShift %= n;
      evenShift %= n;
    }
  }
  oddShift += n;
  oddShift %= n;
  evenShift += n;
  evenShift %= n;
  vector<int> arr(n);
  for (int i = 0; i < (n); ++i) arr[i] = i + 1;
  vector<int> sol(n);
  for (int i = 0; i < (n); ++i)
    if (i % 2 == 0)
      sol[(i + oddShift) % n] = arr[i];
    else
      sol[(i + evenShift) % n] = arr[i];
  for (int i = 0; i < (n); ++i) printf("%d ", sol[i]);
  return 0;
}
