#include <bits/stdc++.h>
using namespace std;
const int MOD = 1000000007;
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  int n, q;
  scanf("%d %d", &n, &q);
  int s1 = 1;
  int s2 = 2;
  for (int i = 0; i < q; ++i) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      s1 += x;
      s2 += x;
      if (s1 > n)
        s1 -= n;
      else if (s1 <= 0)
        s1 += n;
      if (s2 > n)
        s2 -= n;
      else if (s2 <= 0)
        s2 += n;
    } else {
      if (s1 & 1)
        s1++;
      else
        s1--;
      if (s2 & 1)
        s2++;
      else
        s2--;
    }
  }
  vector<int> ans(n + 1, 0);
  for (int i = 1; i <= n; i += 2) {
    int t = s1 + i - 1;
    if (t > n)
      t -= n;
    else if (t <= 0)
      t += n;
    ans[t] = i;
  }
  for (int i = 2; i <= n; i += 2) {
    int t = s2 + i - 2;
    if (t > n)
      t -= n;
    else if (t <= 0)
      t += n;
    ans[t] = i;
  }
  for (int i = 1; i <= n; ++i) printf("%d ", ans[i]);
}
