#include <bits/stdc++.h>
using namespace std;
const long long int MOD = 1e9 + 7;
const long long int MAXN = 1e5 + 5;
long long int fastexpo(long long int b, long long int exp) {
  if (exp == 0) return 1;
  if (exp == 1) return b;
  long long int ans = (fastexpo(b, exp / 2) % MOD);
  ans *= ans;
  ans %= MOD;
  if (exp % 2 == 1) {
    ans *= b;
  }
  ans %= MOD;
  return ans;
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long int n, m;
  cin >> n >> m;
  long long int odd = 0;
  long long int even = 1;
  for (long long int i = 0; i < m; i++) {
    long long int t1;
    cin >> t1;
    if (t1 == 2) {
      if (odd % 2 == 0) {
        odd++;
      } else {
        odd--;
      }
      if (even % 2 == 0) {
        even++;
      } else {
        even--;
      }
    } else {
      long long int t2;
      cin >> t2;
      if (t2 < 0) t2 = n + t2;
      odd += t2;
      odd %= n;
      even += t2;
      even %= n;
    }
  }
  long long int ans[n + 2];
  for (long long int i = 0; i < n / 2; i++) {
    long long int idx = ((i * 2) + even) % n;
    ans[idx] = (i + 1) * 2;
  }
  for (long long int i = 0; i < n / 2; i++) {
    long long int idx = ((i * 2) + odd) % n;
    ans[idx] = i * 2;
    ans[idx]++;
  }
  for (long long int i = 0; i < n; i++) {
    cout << ans[i] << ' ';
  }
  cout << endl;
  return 0;
}
