#include <bits/stdc++.h>
using namespace std;
long long N, Q, genap, ganjil;
long long ans[1000005], tipe, x;
long long modulo(long long a, long long b) {
  if (a >= 0) return a % b;
  long long tmp = abs(a) / b;
  return (b * (tmp + 1) + a) % b;
}
int main() {
  scanf("%I64d %I64d", &N, &Q);
  for (long long i = 0; i < Q; i++) {
    scanf("%I64d", &tipe);
    if (tipe == 1) {
      scanf("%I64d", &x);
      genap += x;
      ganjil += x;
    } else {
      if (abs(genap) % 2 == 0)
        genap--;
      else
        genap++;
      if (abs(ganjil) % 2 == 0)
        ganjil++;
      else
        ganjil--;
    }
  }
  for (long long i = 1; i <= N; i++) {
    long long idx = modulo(i + (i % 2 == 0 ? genap : ganjil), N);
    if (idx == 0) idx = N;
    ans[idx] = i;
  }
  for (int i = 1; i <= N; i++) {
    printf("%I64d", ans[i]);
    if (i == N)
      printf("\n");
    else
      printf(" ");
  }
  return 0;
}
