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