#include <bits/stdc++.h>
using namespace std;
void solve(int test_number);
int main() {
  int n = 1;
  for (int i = 0; i < n; i++) {
    solve(i + 1);
  }
  return 0;
}
const int MAXN = 1000100;
int n, q;
int a[MAXN];
inline int swap(int p) {
  if (p % 2 == 0)
    return p - 1;
  else
    return p + 1;
}
inline int shift(int p, int d) {
  p += d;
  if (p > n) {
    p = p - n;
  }
  if (p < 1) {
    p = n + p;
  }
  return p;
}
void solve(int test_number) {
  scanf("%d%d", &n, &q);
  int p1 = 1, p2 = 2;
  for (int i = 0; i < q; i++) {
    int t, d;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &d);
      p1 = shift(p1, d);
      p2 = shift(p2, d);
    } else {
      p1 = swap(p1);
      p2 = swap(p2);
    }
  }
  int cur = 1;
  for (int i = 0; i < n / 2; i++) {
    a[p1] = cur;
    cur += 2;
    p1 += 2;
    if (p1 > n) p1 = p1 - n;
  }
  cur = 2;
  for (int i = 0; i < n / 2; i++) {
    a[p2] = cur;
    cur += 2;
    p2 += 2;
    if (p2 > n) p2 = p2 - n;
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", a[i]);
  }
  printf("\n");
}
