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