#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q, a = 0, b = 1;
  cin >> n >> q;
  for (int i = 0; i < q; i++) {
    int t, x;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      if (x >= 0) {
        a = (a + x) % n;
        b = (b + x) % n;
      } else {
        a = (a + (n + x)) % n;
        b = (b + (n + x)) % n;
      }
    } else {
      if ((a + 1) % 2 == 0) {
        a--;
        b++;
      } else {
        a++;
        b--;
      }
    }
  }
  int n1 = 1, n2 = 2;
  if (a > 1)
    for (int i = a; i < n; i += 2, n1 += 2)
      ;
  if (b > 1)
    for (int i = b; i < n; i += 2, n2 += 2)
      ;
  if (a % 2 == 1) {
    int t = n1;
    n1 = n2;
    n2 = t;
  }
  for (int i = 0; i < n; i += 2) {
    printf("%d %d ", n1, n2);
    n1 += 2;
    if (n1 > n) n1 -= n;
    n2 += 2;
    if (n2 > n) n2 -= n;
  }
}
