#include <bits/stdc++.h>
using namespace std;
const long long N = 1e6 + 5;
long long a[N];
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  long long n, q;
  cin >> n >> q;
  long long odd_shift = 0, even_shift = 0;
  for (long long i = 0; i < q; i++) {
    long long t;
    cin >> t;
    if (t == 1) {
      long long sh;
      cin >> sh;
      sh = (sh + n) % n;
      odd_shift += sh;
      even_shift += sh;
    } else {
      if (odd_shift % 2 == 0)
        odd_shift--;
      else
        odd_shift++;
      if (even_shift % 2 == 0)
        even_shift++;
      else
        even_shift--;
    }
  }
  for (long long i = 0; i < n; i++) {
    if (i % 2)
      a[(i + odd_shift % n) % n] = i;
    else
      a[(i + even_shift % n) % n] = i;
  }
  for (long long i = 0; i < n; i++) cout << a[i] + 1 << " ";
}
