#include <bits/stdc++.h>
using namespace std;
int res[1000005];
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  int one = 0, two = 1;
  while (q--) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int x;
      scanf("%d", &x);
      x = x % n;
      one = (one + x + n) % n;
      two = (two + x + n) % n;
    } else {
      if (one % 2) {
        one--;
        two++;
      } else {
        one++;
        two--;
      }
    }
  }
  int k = 1;
  while (k != n + 1) {
    res[one] = k;
    one = (one + 2) % n;
    k += 2;
  }
  k = 2;
  while (k != n + 2) {
    res[two] = k;
    two = (two + 2) % n;
    k += 2;
  }
  for (int i = 0; i < n; i++) printf("%d ", res[i]);
  return 0;
}
