#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000010;
int ans[MAXN];
int main() {
  int N, Q;
  scanf("%d%d", &N, &Q);
  int pos1 = 0, pos2 = 1;
  for (int i = 0; i < Q; i++) {
    int operation;
    scanf("%d", &operation);
    if (operation == 1) {
      int value;
      scanf("%d", &value);
      pos1 = (pos1 + value + N) % N;
      pos2 = (pos2 + value + N) % N;
    } else {
      pos1 ^= 1;
      pos2 ^= 1;
    }
  }
  ans[pos1] = 1;
  ans[pos2] = 2;
  for (int i = (pos1 + 2) % N, j = 3; i != pos1; i = (i + 2) % N, j += 2)
    ans[i] = j;
  for (int i = (pos2 + 2) % N, j = 4; i != pos2; i = (i + 2) % N, j += 2)
    ans[i] = j;
  for (int i = 0; i < N; i++) printf("%d ", ans[i]);
  cout << endl;
  return 0;
}
