#include <bits/stdc++.h>
using namespace std;
char CPRBUFF[200000];
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL);
  long n, q;
  cin >> n >> q;
  long odd = 0, even = 0;
  for (long i = 0; i < q; i++) {
    int t;
    cin >> t;
    if (t == 2) {
      odd += -2 * (odd % 2) + 1;
      even += -2 * ((even + 1) % 2) + 1;
    } else {
      int d;
      cin >> d;
      odd += d;
      even += d;
    }
    odd = (n + odd - 1) % n + 1;
    even = (n + even - 1) % n + 1;
  }
  for (long i = 1; i <= n; i++) {
    if (i % 2 != odd % 2) do {
        sprintf(CPRBUFF, "%d", (i + n - odd - 1) % n + 1);
        cout << CPRBUFF;
      } while (0);
    else
      do {
        sprintf(CPRBUFF, "%d", (i + n - even - 1) % n + 1);
        cout << CPRBUFF;
      } while (0);
    do {
      sprintf(CPRBUFF, " ");
      cout << CPRBUFF;
    } while (0);
  }
  do {
    sprintf(CPRBUFF, "\n");
    cout << CPRBUFF;
  } while (0);
}
