#include <bits/stdc++.h>
using namespace std;
int n, q, mas[1000005];
pair<long long, long long> p[2000001];
int len = 0;
void init() {
  scanf("%d %d", &n, &q);
  int a, b;
  long long odd = 0, even = 0;
  for (int i = 0; i < q; ++i) {
    scanf("%d", &a);
    if (a == 1) {
      cin >> b;
      odd += b;
      even += b;
      if (abs(b) & 1) {
        p[len++] = make_pair(odd, even);
        odd = even = 0;
      }
    } else {
      odd++;
      even--;
      p[len++] = make_pair(odd, even);
      odd = even = 0;
    }
  }
  if (odd != 0 || even != 0) p[len++] = make_pair(odd, even);
}
void solve() {
  long long odd = 0, even = 0;
  for (int i = 0; i < len; ++i) {
    if (i & 1) {
      odd += p[i].second;
      even += p[i].first;
    } else {
      odd += p[i].first;
      even += p[i].second;
    }
  }
  for (int i = 1; i <= n; ++i) {
    if (i & 1) {
      int pos = (i + odd + 1000001 * 1LL * n) % n;
      if (pos == 0)
        mas[n] = i;
      else
        mas[pos] = i;
    } else {
      int pos = (i + even + 1000001 * 1LL * n) % n;
      if (pos == 0)
        mas[n] = i;
      else
        mas[pos] = i;
    }
  }
  for (int i = 1; i <= n; ++i) printf("%d ", mas[i]);
}
int main() {
  init();
  solve();
  return 0;
}
