#include <bits/stdc++.h>
using namespace std;
using ll = long long;
template <class T, int SZ>
struct LazySeg {
  static_assert((ll)__builtin_popcountll(SZ) == 1);
  const T ID = 0;
  T comb(T a, T b) { return a + b; }
  T seg[2 * SZ], lazy[2 * SZ];
  LazySeg() {
    for (int i = 0; i < 2 * SZ; i++) seg[i] = lazy[i] = ID;
  }
  void push(int ind, int L, int R) {
    seg[ind] += (R - L + 1) * lazy[ind];
    if (L != R)
      for (int i = 0; i < 2; i++) lazy[2 * ind + i] += lazy[ind];
    lazy[ind] = 0;
  }
  void pull(int ind) { seg[ind] = comb(seg[2 * ind], seg[2 * ind + 1]); }
  void build() {
    for (int i = SZ; i >= 1; i--) pull(i);
  }
  void upd(int lo, int hi, T inc, int ind = 1, int L = 0, int R = SZ - 1) {
    push(ind, L, R);
    if (hi < L || R < lo) return;
    if (lo <= L && R <= hi) {
      lazy[ind] = inc;
      push(ind, L, R);
      return;
    }
    int M = (L + R) / 2;
    upd(lo, hi, inc, 2 * ind, L, M);
    upd(lo, hi, inc, 2 * ind + 1, M + 1, R);
    pull(ind);
  }
  T query(int lo, int hi, int ind = 1, int L = 0, int R = SZ - 1) {
    push(ind, L, R);
    if (lo > R || L > hi) return ID;
    if (lo <= L && R <= hi) return seg[ind];
    int M = (L + R) / 2;
    return comb(query(lo, hi, 2 * ind, L, M),
                query(lo, hi, 2 * ind + 1, M + 1, R));
  }
};
int main() {
  std::ios_base::sync_with_stdio(false);
  cin.tie(nullptr);
  int n, q;
  cin >> n >> q;
  ll odd_net = 0, even_net = 0;
  bool odd_is_odd = 1;
  while (q--) {
    int a;
    cin >> a;
    if (a == 1) {
      int net;
      cin >> net;
      if (net < 0) net += n;
      if (net % 2 == 0) {
        odd_net += net;
        even_net += net;
      } else {
        odd_net += net;
        even_net += net;
        odd_is_odd = !odd_is_odd;
      }
    } else {
      if (odd_is_odd) {
        --even_net, ++odd_net;
        odd_is_odd = !odd_is_odd;
      } else {
        ++even_net, --odd_net;
        odd_is_odd = !odd_is_odd;
      }
    }
  }
  vector<int> ans(n + 1);
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 0) {
      if (odd_is_odd) {
        int val = (i + even_net) % n;
        if (val == 0) val = n;
        ans[val] = i;
      } else {
        ans[(i + even_net) % n] = i;
      }
    } else {
      if (odd_is_odd) {
        ans[(i + odd_net) % n] = i;
      } else {
        int val = (i + odd_net) % n;
        if (val == 0) val = n;
        ans[val] = i;
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    cout << ans[i] << " ";
  }
  cout << "\n";
}
