#include <bits/stdc++.h>
using namespace std;
using ll = long long;
ll delta[2];
int ans[10000010];
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  for (int i = 0; i < q; ++i) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      delta[0] += x;
      delta[1] += x;
    } else {
      if (delta[0] % 2 == 0) {
        delta[0] += 1;
        delta[1] -= 1;
      } else {
        delta[0] -= 1;
        delta[1] += 1;
      }
    }
  }
  for (int i = 0; i < n; ++i) {
    ans[(((delta[i % 2] + i) % n) + n) % n] = i;
  }
  for (int i = 0; i < n; ++i) {
    printf("%d ", ans[i] + 1);
  }
  printf("\n");
}
