#include <bits/stdc++.h>
using namespace std;
int Ans[1000005];
int n, q;
int main() {
  cin >> n >> q;
  int pl1 = 1;
  int pl2 = 2;
  while (q--) {
    int type;
    scanf("%d", &type);
    if (type == 1) {
      int pos;
      scanf("%d", &pos);
      pl1 += pos;
      while (pl1 < 1) {
        pl1 += n;
      }
      pl1 %= n;
      if (pl1 == 0) {
        pl1 = n;
      }
      pl2 += pos;
      while (pl2 < 1) {
        pl2 += n;
      }
      pl2 %= n;
      if (pl2 == 0) {
        pl2 = n;
      }
    } else {
      if (pl1 % 2 == 0) {
        pl1--;
        if (pl1 == 0) {
          pl1 = n;
        }
      } else {
        pl1++;
        if (pl1 == n + 1) {
          pl1 = 1;
        }
      }
      if (pl2 % 2 == 0) {
        pl2--;
        if (pl2 == 0) {
          pl2 = n;
        }
      } else {
        pl2++;
        if (pl2 == n + 1) {
          pl2 = 1;
        }
      }
    }
  }
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 1) {
      int ans = pl1 - 1 + i;
      ans %= n;
      if (ans == 0) {
        ans = n;
      }
      Ans[ans] = i;
    } else {
      int ans = pl2 - 2 + i;
      ans %= n;
      if (ans == 0) {
        ans = n;
      }
      Ans[ans] = i;
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", Ans[i]);
  }
  return 0;
}
