#include <bits/stdc++.h>
using namespace std;
const long long mod = 1000000007;
const long long inf = LLONG_MAX;
const long long ninf = LLONG_MIN;
const long double eps = 1e-12;
const long long N = 1000005;
const long long LOGN = 19;
long long n, q;
long long pos[N];
int main() {
  scanf("%I64d", &n);
  scanf("%I64d", &q);
  long long odd = 0, even = 0, o = 1, e = -1;
  while (q--) {
    long long t;
    scanf("%I64d", &t);
    if (t == 1) {
      long long x;
      scanf("%I64d", &x);
      odd += x;
      even += x;
      if (x % 2) {
        swap(o, e);
      }
    } else {
      odd += o;
      even += e;
      swap(o, e);
    }
  }
  if (odd < 0) {
    odd = (-1 * odd) % n;
    odd = -1 * odd;
  } else {
    odd = odd % n;
  }
  if (even < 0) {
    even = (-1 * even) % n;
    even = -1 * even;
  } else {
    even = even % n;
  }
  for (int i = 1; i <= n; i++) {
    if (i % 2) {
      long long x = (i + odd - 1 + n) % n + 1;
      pos[x] = i;
    } else {
      long long x = (i + even - 1 + n) % n + 1;
      pos[x] = i;
    }
  }
  for (int i = 1; i <= n; i++) printf("%I64d ", pos[i]);
  printf("\n");
  return 0;
}
