#include <bits/stdc++.h>
using namespace std;
int n, m, p1, p2, a[1000010], l1, l2;
int main() {
  scanf("%d%d", &n, &m);
  p1 = 0;
  p2 = 1;
  l1 = 1, l2 = 2;
  while (m--) {
    int op, x;
    scanf("%d", &op);
    if (op == 1) {
      scanf("%d", &x);
      p1 = p1 + x;
      p2 = p2 + x;
    } else {
      if (p1 % 2)
        p1 = p1 - 1;
      else
        p1 = p1 + 1;
      if (p2 % 2)
        p2 = p2 - 1;
      else
        p2 = p2 + 1;
    }
    p1 = (p1 % n + n) % n;
    p2 = (p2 % n + n) % n;
  }
  while (1) {
    if (a[p1]) break;
    a[p1] = l1;
    l1 += 2;
    p1 += 2;
    p1 %= n;
  }
  while (1) {
    if (a[p2]) break;
    a[p2] = l2;
    l2 += 2;
    p2 += 2;
    p2 %= n;
  }
  for (int i = 0; i < n; i++) printf("%d ", a[i]);
}
