#include <bits/stdc++.h>
using namespace std;
int n, m;
pair<int, int> q[2000005];
int ans[2000005];
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i < m; i++) {
    int x, y = 2;
    scanf("%d", &x);
    if (x == 1) {
      scanf("%d", &y);
    }
    q[i] = make_pair(x, y);
  }
  long long odd = 1, even = 2;
  for (int i = 0; i < m; i++) {
    int type = q[i].first, val = q[i].second;
    if (type == 1) {
      odd += val, even += val;
    } else {
      if (odd % 2 == 0)
        odd--;
      else
        odd++;
      if (even % 2 == 0)
        even--;
      else
        even++;
    }
    if (odd > n) odd -= n;
    if (even > n) even -= n;
    if (odd < -n) odd += n;
    if (even < -n) even += n;
  }
  for (int i = 1; i <= n; i++) {
    int who = (i % 2 == 0) ? even : odd;
    int hh = (i % 2 == 0) ? 2 : 1;
    int val = i + (who - hh);
    int cur = val;
    while (cur > n) cur -= n;
    while (cur <= 0) cur += n;
    ans[cur] = i;
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
  return 0;
}
