#include <bits/stdc++.h>
using namespace std;
const int N = 1111111;
const int INF = 1e9;
const long long LLINF = 1e18 * 1LL;
const int mod = 1e9 + 7;
int a[N], used[N], p[N];
int main() {
  int n, m;
  cin >> n >> m;
  int x1 = 1, x2 = 2;
  for (int i = 0; i < m; ++i) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int y;
      scanf("%d", &y);
      x1 += y;
      if (x1 < 1) x1 += n;
      if (x1 > n) x1 -= n;
      x2 += y;
      if (x2 < 1) x2 += n;
      if (x2 > n) x2 -= n;
    } else {
      if (x1 % 2)
        ++x1;
      else
        --x1;
      if (x2 % 2)
        ++x2;
      else
        --x2;
    }
  }
  int pos1, pos2;
  pos1 = x1;
  pos2 = x2;
  for (int i = 1; i <= n; ++i) {
    if (i % 2) {
      int ans = i + pos1 - 1;
      if (ans > n) ans -= n;
      p[ans] = i;
    } else {
      int ans = i + pos2 - 2;
      if (ans > n) ans -= n;
      p[ans] = i;
    }
  }
  for (int i = 1; i <= n; ++i) {
    printf("%d ", p[i]);
  }
}
