#include <bits/stdc++.h>
using namespace std;
const int inf = 1000000007;
int n, q;
inline int cmod(int first) {
  first %= n;
  if (first < 0) first += n;
  return first;
}
int a[1000000 + 10];
int main(int argc, char const *argv[]) {
  scanf("%d %d", &n, &q);
  int even = 1;
  int odd = 0;
  for (__typeof(q) i = 0; i < q; i++) {
    int t, first;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &first);
      even += first;
      even = cmod(even);
      odd += first;
      odd = cmod(odd);
    } else {
      if (even % 2 == 1)
        even = cmod(even - 1);
      else
        even = cmod(even + 1);
      if (odd % 2 == 1)
        odd = cmod(odd - 1);
      else
        odd = cmod(odd + 1);
    }
  }
  for (int i = 0; i < n; i += 2) {
    a[cmod(i + odd)] = i + 1;
  }
  for (int i = 1; i < n; i += 2) {
    a[cmod(i + even - 1)] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
  return 0;
}
