#include <bits/stdc++.h>
using namespace std;
int ans[1000005] = {0};
int n, q;
int mod(int x) { return x % n; }
int main() {
  ios::sync_with_stdio(false);
  cin >> n >> q;
  int n1 = 0, n2 = 0, nn1 = 1;
  for (int i = 1; i <= q; i++) {
    int temp;
    cin >> temp;
    if (temp == 1) {
      int d;
      cin >> d;
      if (abs(d % 2) == 1) {
        if (nn1)
          nn1 = 0;
        else
          nn1 = 1;
      }
      n1 += d;
      n2 += d;
      n1 = mod(n1);
      n2 = mod(n2);
    }
    if (temp == 2) {
      if (nn1) {
        nn1 = 0;
        n1++;
        n2--;
        n1 = mod(n1);
        n2 = mod(n2);
      } else {
        nn1 = 1;
        n1--;
        n2++;
        n1 = mod(n1);
        n2 = mod(n2);
      }
    }
  }
  n1 = mod(n1);
  n2 = mod(n2);
  for (int i = 1; i <= n; i++) {
    int now = i;
    if (now % 2)
      now += n1;
    else
      now += n2;
    now %= n;
    if (now <= 0) now += n;
    ans[now] = i;
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
  return 0;
}
