#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  scanf("%d", &n);
  scanf("%d", &q);
  int b1 = 1, b2 = 2;
  while (q--) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int move;
      scanf("%d", &move);
      if (move < 0) {
        b1 += move;
        b2 += move;
        if (b1 < 1) b1 = n + b1;
        if (b2 < 1) b2 = n + b2;
      } else if (move > 0) {
        b1 += move;
        b2 += move;
        if (b1 > n) b1 -= n;
        if (b2 > n) b2 -= n;
      }
    } else {
      if (b1 & 1) {
        b1++;
        if (b1 > n) b1 -= n;
      } else {
        b1--;
        if (b1 < 1) b1 = n + b1;
      }
      if (b2 & 1) {
        b2++;
        if (b2 > n) b2 -= n;
      } else {
        b2--;
        if (b2 < 1) b2 = n + b2;
      }
    }
  }
  int ans[n];
  b1--;
  b2--;
  int ind1 = b1, v1 = 1, ind2 = b2, v2 = 2;
  for (int i = 0; i < n / 2; i++) {
    ans[ind1] = v1;
    ans[ind2] = v2;
    v1 += 2;
    v2 += 2;
    ind1 += 2;
    ind2 += 2;
    ind1 %= n;
    ind2 %= n;
  }
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
  return 0;
}
