#include <bits/stdc++.h>
using namespace std;
const int inf = (int)1e9;
const double EPS = 1e-9;
const long long mod = 1000000007ll;
const int maxn = (int)1000000 + 10;
int n, m;
int ans[maxn];
int moD(int x) { return (x % n + n) % n; }
int main() {
  scanf("%d%d", &n, &m);
  int p1 = 0, p2 = 1, ty, d;
  for (int i = 0; i < (int)(m); ++i) {
    scanf("%d", &ty);
    if (ty == 2)
      p1 ^= 1, p2 ^= 1;
    else {
      scanf("%d", &d);
      p1 = moD(p1 + d);
      p2 = moD(p2 + d);
    }
  }
  for (int i = 0; i < n / 2; i++)
    ans[moD(p1 + i * 2)] = i * 2 + 1, ans[moD(p2 + i * 2)] = i * 2 + 2;
  for (int i = 0; i < n; i++) printf("%d ", ans[i]);
}
