#include <bits/stdc++.h>
using namespace std;
int n, m, type[3000000];
int x[3000000];
int a[3000000];
int go(int x, int y) {
  x = (x + y + n) % n;
  if (x == 0) x = n;
  return x;
}
int main() {
  scanf("%d%d", &n, &m);
  int cur1 = 1;
  int cur2 = 2;
  for (int i = 1; i <= m; ++i) {
    scanf("%d", &type[i]);
    if (type[i] == 2) {
      if (cur1 & 1)
        cur1++;
      else
        cur1--;
      if (cur2 & 1)
        cur2++;
      else
        cur2--;
    } else {
      scanf("%d", &x[i]);
      cur1 = go(cur1, x[i]);
      cur2 = go(cur2, x[i]);
    }
  }
  int cur = 1;
  for (int i = 1; i <= n / 2; ++i) {
    a[cur1] = cur;
    cur += 2;
    cur1 = go(cur1, 2);
  }
  cur = 2;
  for (int i = 1; i <= n / 2; ++i) {
    a[cur2] = cur;
    cur += 2;
    cur2 = go(cur2, 2);
  }
  for (int i = 1; i <= n; i++) printf("%d ", a[i]);
}
