#include <bits/stdc++.h>
using namespace std;
int mass[1000000] = {0};
int main() {
  long long n, q;
  cin >> n >> q;
  long long first = 0, second = 1;
  for (int i = 0; i < q; i++) {
    long long type;
    scanf("%lld", &type);
    if (type == 2) {
      if (first % 2 == 1)
        first--;
      else
        first++;
      if (second % 2 == 0)
        second++;
      else
        second--;
    } else {
      long long x;
      scanf("%lld", &x);
      first += x;
      second += x;
    }
    first = (first + n * 10000000) % n;
    second = (second + n * 10000000) % n;
  }
  for (int i = first; i < first + n; i += 2) {
    mass[i % n] = 1 + (i - first);
  }
  for (int i = second; i < second + n; i += 2) {
    mass[i % n] = 2 + (i - second);
  }
  for (int i = 0; i < n; i++) printf("%d ", mass[i]);
  return 0;
}
