#include <bits/stdc++.h>
using namespace std;
int ans[1000005];
int main() {
  int n, m;
  while (~scanf("%d %d", &n, &m)) {
    int x, y;
    int sum1 = 1, sum2 = 2;
    for (int i = 1; i <= m; i++) {
      scanf("%d", &x);
      if (x == 1) {
        scanf("%d", &y);
        sum1 += y;
        sum2 += y;
        sum1 %= n;
        sum1 += n;
        sum1 %= n;
        sum2 %= n;
        sum2 += n;
        sum2 %= n;
      } else {
        if (sum2 % 2) {
          sum1--;
          sum2++;
        } else {
          sum1++;
          sum2--;
        }
        sum1 %= n;
        sum1 += n;
        sum1 %= n;
        sum2 %= n;
        sum2 += n;
        sum2 %= n;
      }
    }
    sum1 %= n;
    sum1 += n;
    sum1 %= n;
    sum2 %= n;
    sum2 += n;
    sum2 %= n;
    for (int i = 1; i <= n;) {
      if (sum1 == 0) sum1 = n;
      if (sum2 == 0) sum2 = n;
      ans[sum1] = i++;
      ans[sum2] = i++;
      sum1 = (sum1 + 2 + n) % n;
      sum2 = (sum2 + 2 + n) % n;
    }
    for (int i = 1; i <= n; i++) printf("%d%c", ans[i], i == n ? '\n' : ' ');
  }
  return 0;
}
