#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q;
  cin >> n >> q;
  long long p1 = 1, p2 = 2;
  int a, b;
  for (int i = 0; i < q; i++) {
    scanf("%d", &a);
    if (a == 1) {
      scanf("%d", &b);
      p1 += b;
      p2 += b;
    } else {
      if (abs(p1) % 2 == 1)
        p1++;
      else
        p1--;
      if (abs(p2) % 2 == 1)
        p2++;
      else
        p2--;
    }
  }
  p1 %= n;
  p2 %= n;
  vector<int> v(n);
  int vpos1, vpos2;
  if (p1 > 0)
    vpos1 = p1 - 1;
  else
    vpos1 = n + p1 - 1;
  if (p2 > 0)
    vpos2 = p2 - 1;
  else
    vpos2 = n + p2 - 1;
  int k = 1;
  while (v[vpos1] != 1) {
    v[vpos1] = k;
    k += 2;
    vpos1 += 2;
    vpos1 %= n;
  }
  k = 2;
  while (v[vpos2] != 2) {
    v[vpos2] = k;
    k += 2;
    vpos2 += 2;
    vpos2 %= n;
  }
  for (int i = 0; i < n; i++) printf("%d ", v[i]);
}
