#include <bits/stdc++.h>
using namespace std;
long long rd(long long &x) { return scanf("%lld", &x); }
long long rd(long long &x, long long &y) { return scanf("%lld %lld", &x, &y); }
long long rd(long long &x, long long &y, long long &z) {
  return scanf("%lld %lld %lld", &x, &y, &z);
}
long long rd(long long &x, long long &y, long long &z, long long &s) {
  return scanf("%lld %lld %lld %lld", &x, &y, &z, &s);
}
struct debugger {
  template <class T>
  debugger &operator,(const T &v) {
    cerr << v << " ";
    return *this;
  }
} dbg;
void debugv(vector<long long> vec) {
  cerr << "printing vector:: ";
  for (long long i = 0; i < (vec.size()); i++) {
    cout << vec[i] << " ";
  }
  cerr << endl;
}
void debugs(set<long long> s) {
  cerr << "printing set:: ";
  for (auto it = s.begin(); it != s.end(); it++) {
    cout << (*it) << " ";
  }
  cerr << endl;
}
long long n, q, even, odd;
bool b;
int main() {
  rd(n, q);
  while (q--) {
    long long x, p;
    rd(x);
    if (x == 2) {
      b ^= 1;
    } else {
      rd(p);
      if (p & 1) {
        long long h = (p + 1) >> 1, l = (p - 1) >> 1;
        if (b) {
          odd += h;
          even += l;
        } else {
          even += h;
          odd += l;
        }
        b ^= 1;
      } else {
        long long h = p >> 1;
        even += h;
        odd += h;
      }
    }
  }
  even %= (n >> 1);
  odd %= (n >> 1);
  even = (even + (n >> 1)) % (n >> 1);
  odd = (odd + (n >> 1)) % (n >> 1);
  vector<long long> ev, od;
  for (long long i = 1; i <= (n); i++) {
    if (i & 1)
      od.push_back(i);
    else
      ev.push_back(i);
  }
  long long e[n >> 1], o[n >> 1];
  for (long long i = even, w = odd, j = 0; j < (n >> 1); j++, i++, w++) {
    e[(i) % (n >> 1)] = ev[j];
    o[(w) % (n >> 1)] = od[j];
  }
  if (b) {
    for (long long i = 0; i < (n >> 1); i++) {
      printf("%lld %lld ", e[i], o[i]);
    }
  } else {
    for (long long i = 0; i < (n >> 1); i++) {
      printf("%lld %lld ", o[i], e[i]);
    }
  }
  return 0;
}
