#include <bits/stdc++.h>
using namespace std;
const int INF = numeric_limits<int>::max();
inline int pow2(int k) { return 1 << k; }
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  scanf("%d %d", &n, &q);
  int s1 = 0;
  int s2 = 1;
  for (int i = 0; i < q; i++) {
    int t, x;
    scanf("%d", &t);
    if (t == 2) {
      if (s1 % 2 == 0) {
        s1 += 1;
      } else {
        s1 -= 1;
      }
      if (s2 % 2 == 0) {
        s2 += 1;
      } else {
        s2 -= 1;
      }
    } else {
      scanf("%d", &x);
      s1 += x;
      s2 += x;
    }
    s1 = s1 % n;
    s2 = s2 % n;
  }
  for (int i = 0; i < n; ++i) {
    int k;
    if ((i - s1) % 2 == 0) {
      k = (i - s1) % n;
      k += 1;
    } else {
      k = (i - s2) % n;
      k += 2;
    }
    if (k <= 0) k += n;
    printf("%d ", k);
  }
  return 0;
}
