#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:10000000000")
using namespace std;
const int maxM = 101, maxN = 1000000;
const long long mod = 1e9 + 7;
long long pos[maxN];
long long ans[maxN];
long long getmod(long long x, long long n) {
  x = x % n;
  if (x < 0) {
    x = n + x;
  }
  return x;
}
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  long long toeven = 0, toodd = 0;
  int first = 0;
  for (int i = 0; i < n; i++) {
    pos[i] = i;
  }
  for (int i = 0; i < q; i++) {
    int t;
    scanf("%d", &t);
    if (t == 1) {
      int x;
      scanf("%d", &x);
      toeven += x;
      toodd += x;
      if ((x & 1) == 0) {
        ;
      } else {
        if (first == 1) {
          first = 0;
        } else {
          first = 1;
        }
      }
    } else {
      if (first == 0) {
        toodd++;
        toeven--;
        first = 1;
      } else {
        toodd--;
        toeven++;
        first = 0;
      }
    }
  }
  for (int i = 0; i < n; i++) {
    if ((i & 1) == 0) {
      pos[i] += toodd;
    } else {
      pos[i] += toeven;
    }
    ans[getmod(pos[i], n)] = i + 1;
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i]);
  }
  return 0;
}
