#include <bits/stdc++.h>
using namespace std;
bool NIF;
char NIC;
inline void nextInt(int& x) {
  NIF = 0;
  x = 0;
  bool neg = 0;
  while (NIC = getchar()) {
    if (NIC == '-') {
      neg = 1;
      continue;
    }
    if (NIC < '0' || NIC > '9')
      if (!NIF)
        continue;
      else
        break;
    x = x * 10 + (NIC - '0');
    NIF = 1;
  }
  if (neg) x *= -1;
}
int main() {
  ios_base::sync_with_stdio(0);
  int n, m;
  nextInt(n);
  nextInt(m);
  int cnt = 0;
  int addsum = 0;
  vector<int> v(n);
  vector<int> d(n);
  for (int i = 0; i < n; i++) d[i] = i & 1;
  for (int i = 0; i < n; i++) {
    v[i] = i;
    if (i & 1) v[i] ^= 1;
  }
  int c0 = 0;
  int c1 = 0;
  for (int i = 0; i < m; i++) {
    int t, x;
    nextInt(t);
    if (t == 2)
      cnt ^= 1;
    else {
      nextInt(x);
      x += n;
      if (x & 1) {
        x--;
        if (d[0] ^ cnt)
          c0 += 2;
        else
          c1 += 2;
        cnt ^= 1;
      }
      addsum += n + x;
      addsum %= n;
    }
  }
  for (int i = 0; i < n; i++) {
    v[i] += addsum;
    v[i] += d[i] ^ cnt;
    if (i & 1)
      v[i] += c1;
    else
      v[i] += c0;
    v[i] %= n;
  }
  vector<int> ans(n);
  for (int i = 0; i < n; i++) ans[v[i]] = i;
  for (int x : ans) printf("%d ", x + 1);
  return 0;
}
