#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 2;
int n, m;
int ans[N];
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  int p1 = 0;
  int p2 = 1;
  for (int i = 0; i < q; i++) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      p1 = ((p1 + x + n)) % n;
      p2 = ((p2 + x + n)) % n;
    } else {
      int r = (p1 + 1) % 2;
      if (r == 1)
        p1++;
      else
        p1--;
      p1 = (p1 + n) % n;
      int c = (p2 + 1) % 2;
      if (c == 1)
        p2++;
      else
        p2--;
      p2 = (p2 + n) % n;
    }
  }
  int pos = p1;
  int val = 1;
  for (int j = 0; j < n / 2; j++) {
    ans[pos] = val;
    val += 2;
    pos += 2;
    pos %= n;
  }
  pos = p2;
  val = 2;
  for (int j = 0; j < n / 2; j++) {
    ans[pos] = val;
    val += 2;
    pos += 2;
    pos %= n;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
}
