#include <bits/stdc++.h>
using namespace std;
typedef long double ld;
const long long inf = 1100000000000000000;
void solve() {
  long long n, q;
  cin >> n >> q;
  long long a[n];
  long long x = 0, y = 1, cur = 2;
  while (q--) {
    long long t;
    cin >> t;
    if (t == 1) {
      long long dis;
      cin >> dis;
      x = (x + dis + n) % n;
      y = (y + dis + n) % n;
    } else {
      if (x % 2 == 0)
        x++;
      else
        x--;
      if (y % 2 == 0)
        y++;
      else
        y--;
    }
  }
  for (long long i = 0; i < n / 2; i++) a[y] = cur, y = (y + 2) % n, cur += 2;
  cur = 1;
  for (long long i = 0; i < n / 2; i++) a[x] = cur, x = (x + 2) % n, cur += 2;
  for (long long i = 0; i < n; i++) cout << a[i] << " ";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long tc = 1;
  while (tc--) {
    solve();
  }
  return 0;
}
