#include <bits/stdc++.h>
using namespace std;
void __print(int x) { cerr << x; }
void __print(long x) { cerr << x; }
void __print(long long x) { cerr << x; }
void __print(unsigned x) { cerr << x; }
void __print(unsigned long x) { cerr << x; }
void __print(unsigned long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  int f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
const long long int MOD = 1e9 + 7;
const long long int INF = 1e18;
const long long int maxn = 1e6 + 4;
void get(int *x, int n) {
  if (*x <= 0) *x += n;
  if (*x > n) *x -= n;
}
void solve() {
  int n, q;
  cin >> n >> q;
  int curoddpos = 1;
  int evenpos = 2, oddpos = 1;
  for (int i = 0; i < q; i++) {
    int a, b;
    cin >> a;
    if (a == 2) {
      if (curoddpos % 2)
        evenpos--, oddpos++;
      else
        evenpos++, oddpos--;
    } else {
      cin >> b;
      evenpos += b, oddpos += b;
    }
    get(&evenpos, n);
    get(&oddpos, n);
    if (evenpos % 2) curoddpos = 2;
    if (oddpos % 2) curoddpos = 1;
  }
  vector<int> v(n + 1);
  int cnt = 0, num = 2;
  for (int i = evenpos; cnt < n / 2; i += 2, num += 2, cnt++) {
    get(&i, n);
    v[i] = num;
  }
  cnt = 0, num = 1;
  for (int i = oddpos; cnt < n / 2; i += 2, num += 2, cnt++) {
    get(&i, n);
    v[i] = num;
  }
  for (int i = 1; i <= n; i++) cout << v[i] << ' ';
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  solve();
  cerr << endl << "Program Executed Successfully" << endl;
}
