#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int r1 = 0, r2 = 0;
  int odd = 1, even = 2;
  int n, q;
  cin >> n >> q;
  for (int i = 0; i < q; i++) {
    int x;
    scanf("%d", &x);
    if (x == 1) {
      int d;
      scanf("%d", &d);
      d = d % n;
      if (d == 0) continue;
      if (d % 2 == 0) {
        r1 += d / 2;
        r2 += d / 2;
      } else {
        if (even == 2) {
          if (d > 0) {
            r2 += (1 + d) / 2;
            r1 += d / 2;
          } else {
            r1 += (-1 + d) / 2;
            r2 += d / 2;
          }
        } else {
          if (d > 0) {
            r1 += (d + 1) / 2;
            r2 += d / 2;
          } else {
            r2 += (-1 + d) / 2;
            r1 += d / 2;
          }
        }
        swap(odd, even);
      }
    } else {
      swap(odd, even);
    }
  }
  r1 = r1 % (n / 2);
  r2 = r2 % (n / 2);
  if (odd == 1) {
    for (int i = 0; i < n / 2; i++) {
      printf("%d ", (((i - r1 + n / 2) % (n / 2)) * 2 + 1));
      printf("%d ", (((i - r2 + n / 2) % (n / 2)) * 2 + 2));
    }
  } else {
    for (int i = 0; i < n / 2; i++) {
      printf("%d ", (((i - r2 + n / 2) % (n / 2)) * 2 + 2));
      printf("%d ", (((i - r1 + n / 2) % (n / 2)) * 2 + 1));
    }
  }
  return 0;
}
