#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1000005;
const int MAXM = 1000005;
const int MOD = 1000000007;
const int MAMOD = 998244353;
const int INF = 0x3f3f3f3f;
const long long LLINF = 0x3f3f3f3f3f3f3f3f;
const double PI = acos(-1.0);
const double EPS = 1e-8;
int n, q;
int a[MAXN];
int main() {
  ios::sync_with_stdio(0);
  cin >> n >> q;
  int one = 1, two = 2;
  for (int i = 1, op, x; i <= q; ++i) {
    cin >> op;
    if (op == 1) {
      cin >> x;
      one += x;
      two += x;
      one = (one + n - 1) % n + 1;
      two = (two + n - 1) % n + 1;
    } else {
      one += (one % 2 == 0 ? -1 : 1);
      two += (two % 2 == 0 ? -1 : 1);
      one = (one + n - 1) % n + 1;
      two = (two + n - 1) % n + 1;
    }
  }
  for (int i = 0; i < n / 2; ++i) {
    a[(one + 2 * i - 1) % n + 1] = 1 + 2 * i;
    a[(two + 2 * i - 1) % n + 1] = 2 + 2 * i;
  }
  for (int i = 1; i <= n; ++i) cout << a[i] << (i == n ? "\n" : " ");
  return 0;
}
