#include <bits/stdc++.h>
using namespace std;
inline int read() {
  char ch = getchar();
  int f = 1, x = 0;
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = (x << 3) + (x << 1) + (ch ^ 48);
    ch = getchar();
  }
  return x * f;
}
inline void print(int x) {
  if (x > 9) print(x / 10);
  putchar(x % 10 ^ 48);
}
int a[10000001];
int main() {
  int n = read(), q = read(), sum = 0, sum2 = 1;
  while (q--) {
    int t = read();
    if (t == 1) {
      int x = read();
      x = (x + n) % n;
      sum += x;
      sum2 += x;
    } else {
      sum ^= 1;
      sum2 ^= 1;
    }
    sum %= n;
    sum2 %= n;
  }
  sum2 = (sum2 - 1 + n) % n;
  for (int i = 0; i < n; ++i) a[(i + (i & 1 ? sum2 : sum) + n) % n] = i + 1;
  for (int i = 0; i < n; ++i) {
    print(a[i]);
    putchar(' ');
  }
  return 0;
}
