#include <bits/stdc++.h>
using namespace std;
int sol[1000005];
int main() {
  int N, Q, pos1 = 1, pos2 = 2, X, A;
  scanf("%d%d", &N, &Q);
  for (int i = 0; i < Q; i++) {
    scanf("%d", &A);
    if (A == 2) {
      if (pos1 % 2)
        pos1++;
      else
        pos1--;
      if (pos2 % 2)
        pos2++;
      else
        pos2--;
    } else {
      scanf("%d", &X);
      int temp = abs(X);
      temp %= N;
      if (X < 0) {
        pos1 -= temp;
        pos2 -= temp;
      } else {
        pos1 += temp;
        pos2 += temp;
      }
      if (pos1 < 1) pos1 += N;
      if (pos2 < 1) pos2 += N;
      if (pos1 > N) pos1 -= N;
      if (pos2 > N) pos2 -= N;
    }
  }
  for (int i = 1; i <= N; i += 2) {
    sol[pos1] = i;
    sol[pos2] = i + 1;
    pos1 += 2;
    pos2 += 2;
    if (pos1 > N) pos1 -= N;
    if (pos2 > N) pos2 -= N;
  }
  for (int i = 1; i <= N; i++) printf("%d ", sol[i]);
  return 0;
}
