#include <bits/stdc++.h>
const long long mod = 1000000007;
using namespace std;
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  int cur = 1;
  int cur2 = 2;
  while (q--) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      if (x % 2 == 0) {
        cur -= x;
        cur2 -= x;
        if (cur <= 0) cur += n;
        if (cur2 <= 0) cur2 += n;
        if (cur2 > n) cur2 -= n;
        if (cur > n) cur -= n;
      } else {
        if (x < 0) {
          x++;
          int c = cur;
          cur = cur2;
          cur2 = c + 2;
          if (cur2 > n) cur2 -= n;
        } else {
          x--;
          int c = cur2;
          cur2 = cur;
          cur = c - 2;
          if (cur <= 0) cur += n;
        }
        cur -= x;
        cur2 -= x;
        if (cur <= 0) cur += n;
        if (cur2 <= 0) cur2 += n;
        if (cur2 > n) cur2 -= n;
        if (cur > n) cur -= n;
      }
    } else {
      swap(cur, cur2);
    }
  }
  vector<int> ans(n + 1);
  ans[0] = cur;
  ans[1] = cur2;
  for (int i = 2; i <= n; i++) {
    int j = i / 2;
    if (i % 2 == 0) {
      ans[i] = cur + j * 2;
    } else {
      ans[i] = cur2 + j * 2;
    }
    if (ans[i] > n) ans[i] -= n;
  }
  for (int(i) = 0; (i) < n; (i)++) printf("%d ", ans[i]);
  return 0;
}
