#include <bits/stdc++.h>
using namespace std;
int n, q;
inline int clamp(int v) {
  if (v > n)
    return v - n;
  else if (v < 1) {
    if (v == 0)
      return n;
    else
      return n + v;
  } else
    return v;
}
void validate() {
  n = 6;
  assert(clamp(0) == 6);
  assert(clamp(1) == 1);
  assert(clamp(-1) == 5);
  assert(clamp(6) == 6);
  assert(clamp(7) == 1);
  assert(clamp(3 + 5 % n) == 2);
  assert(clamp(3 + 6 % n) == 3);
  assert(clamp(3 + 7 % n) == 4);
  assert(clamp(3 + 8 % n) == 5);
  assert(clamp(3 + 9 % n) == 6);
  assert(clamp(3 + 10 % n) == 1);
  assert(clamp(3 + 11 % n) == 2);
}
int main() {
  validate();
  cin >> n >> q;
  int startOdd = 1;
  int startEven = 2;
  for (int i = 0; i < q; i++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int count;
      scanf("%d", &count);
      startOdd = clamp(startOdd + (count % n));
      startEven = clamp(startEven + (count % n));
    } else {
      startOdd = (startOdd % 2 == 0) ? startOdd - 1 : startOdd + 1;
      startEven = (startEven % 2 == 0) ? startEven - 1 : startEven + 1;
    }
  }
  int evenOffset = startEven - 2;
  int oddOffset = startOdd - 1;
  int positions[1000000 + 1];
  for (int i = 1; i <= n; i++) {
    int pos = (i % 2 == 1) ? clamp(i + oddOffset) : clamp(i + evenOffset);
    positions[pos] = i;
  }
  for (int i = 1; i <= n; i++) {
    cout << positions[i] << " ";
  }
  cout << endl;
}
