#include <bits/stdc++.h>
using namespace std;
#pragma comment(linker, "/STACK:667772160")
template <class T1>
void deb(T1 e1) {
  cout << e1 << endl;
}
template <class T1, class T2>
void deb(T1 e1, T2 e2) {
  cout << e1 << " " << e2 << endl;
}
template <class T1, class T2, class T3>
void deb(T1 e1, T2 e2, T3 e3) {
  cout << e1 << " " << e2 << " " << e3 << endl;
}
template <class T1, class T2, class T3, class T4>
void deb(T1 e1, T2 e2, T3 e3, T4 e4) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << endl;
}
template <class T1, class T2, class T3, class T4, class T5>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << endl;
}
template <class T1, class T2, class T3, class T4, class T5, class T6>
void deb(T1 e1, T2 e2, T3 e3, T4 e4, T5 e5, T6 e6) {
  cout << e1 << " " << e2 << " " << e3 << " " << e4 << " " << e5 << " " << e6
       << endl;
}
int arr[1000000 + 7];
int main() {
  int n, q, t, s, a = 1, b = 2;
  scanf("%d %d", &n, &q);
  for (int i = 0; i < q; i++) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &s);
      a += s;
      b += s;
      a = a % n;
      b = b % n;
      if (a < 0) a += n;
      if (b < 0) b += n;
      if (a == 0) a = n;
      if (b == 0) b = n;
    } else {
      if (a & 1) {
        a = a + 1;
        a = a % n;
        if (a == 0) a = n;
      } else {
        a -= 1;
        a = a % n;
        if (a < 0) a += n;
        if (a == 0) a = n;
      }
      if (b & 1) {
        b = b + 1;
        b = b % n;
        if (b == 0) b = n;
      } else {
        b -= 1;
        b = b % n;
        if (b < 0) b += n;
        if (b == 0) b = n;
      }
    }
  }
  s = 1;
  for (int i = 0; i < (n / 2); i++) {
    arr[a] = s;
    a += 2;
    a = a % n;
    if (a == 0) a = n;
    s += 2;
  }
  s = 2;
  for (int i = 0; i < (n / 2); i++) {
    arr[b] = s;
    b += 2;
    b = b % n;
    if (b == 0) b = n;
    s += 2;
  }
  for (int i = 1; i <= n; i++) {
    if (i - 1) printf(" ");
    printf("%d", arr[i]);
  }
  printf("\n");
  return 0;
}
