#include <bits/stdc++.h>
using namespace std;
int n, q, a = 0, b = 0;
void move1(int i) {
  if (i > 0) i -= n;
  a = (a - i) % n;
  b = (b - i) % n;
  if ((i + n) % 2 == 1) swap(a, b);
}
void move2() {
  a--;
  b++;
  if (a < 0) a += n;
  if (b >= n) b -= n;
  swap(a, b);
}
int main() {
  scanf("%d%d", &n, &q);
  for (int i = 0; i < q; i++) {
    int temp;
    scanf("%d", &temp);
    if (temp == 1) {
      scanf("%d", &temp);
      move1(temp);
    } else
      move2();
  }
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1) {
      printf("%d ", (a + i - 1) % n + 1);
    } else
      printf("%d ", (b + i - 1) % n + 1);
  }
  cout << endl;
  return 0;
}
