#include <bits/stdc++.h>
using namespace std;
int main() {
  int n = 0;
  int q = 0;
  scanf("%d %d", &n, &q);
  int type = 0;
  int dis = 0;
  int even = 0;
  int odd = 0;
  bool flag = true;
  for (int k = 0; k < q; ++k) {
    scanf("%d", &type);
    if (type == 1) {
      scanf("%d", &dis);
      even = (even + dis + n) % n;
      odd = (odd + dis + n) % n;
      if ((abs(dis) & 1) != 0) {
        flag = !flag;
      }
    } else {
      if (flag) {
        even = (even + 1 + n) % n;
        odd = (odd - 1 + n) % n;
      } else {
        odd = (odd + 1 + n) % n;
        even = (even - 1 + n) % n;
      }
      flag = !flag;
    }
  }
  vector<int> A(n, 0);
  for (int i = 0; i < n; i++) {
    if ((i & 1) == 1) {
      A[(i + odd) % n] = i + 1;
    } else {
      A[(i + even) % n] = i + 1;
    }
  }
  cout << A[0];
  for (int i = 1; i < A.size(); i++) {
    printf(" %d", A[i]);
  }
  cout << endl;
}
