#include <bits/stdc++.h>
using namespace std;
const int MAXN = 3e6;
int M[MAXN + 5], N[MAXN];
int main() {
  int n, m;
  scanf("%d %d", &n, &m);
  for (int i = 1; i <= n; i++) M[i] = i;
  int p = 1, sum = 0, q = 2, ans = 0;
  for (int i = 1; i <= m; i++) {
    int x, y;
    scanf("%d", &x);
    if (x == 1) {
      scanf("%d", &y);
      if (y < 0) y += n;
      sum += y;
      p += y;
      if (sum > n) sum = sum % n;
      p = p % 2;
      if (ans > n) ans = ans % n;
      q = q % 2;
      ans += y;
      q += y;
    } else {
      if (p % 2 != 0)
        sum++, p++;
      else
        sum += n - 1, p--;
      if (q % 2 != 0)
        ans++, q++;
      else
        ans += n - 1, q--;
    }
  }
  sum = sum % n;
  for (int i = 1; i <= n; i += 2) {
    if (i + sum <= n)
      N[i + sum] = i;
    else
      N[i + sum - n] = i;
  }
  ans = ans % n;
  for (int i = 2; i <= n; i += 2) {
    if (i + ans <= n)
      N[i + ans] = i;
    else
      N[i + ans - n] = i;
  }
  for (int i = 1; i <= n; i++) {
    if (i == n)
      printf("%d\n", N[i]);
    else
      printf("%d ", N[i]);
  }
}
