#include <bits/stdc++.h>
using namespace std;
long long int n, q;
long long int arr[1000500];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cin >> n >> q;
  long long int even = 0, odd = 1;
  for (int i = 1; i <= q; i++) {
    int a, b;
    cin >> a;
    if (a == 2) {
      if (even % 2 == 0)
        even++;
      else
        even--;
      if (odd % 2 == 0)
        odd++;
      else
        odd--;
    } else {
      cin >> b;
      even += b;
      odd += b;
    }
    if (even >= n) even -= n;
    if (odd >= n) odd -= n;
    if (odd < 0) odd += n;
    if (even < 0) even += n;
  }
  int pos1 = even, pos2 = odd - 1;
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0) {
      int idx = ((i + pos1) % n + n) % n;
      arr[idx] = i;
    } else {
      int idx = ((i + pos2) % n + n) % n;
      arr[idx] = i;
    }
  }
  for (int i = 0; i < n; i++) cout << arr[i] + 1 << " ";
  return 0;
}
