#include <bits/stdc++.h>
using namespace std;
long long const N = 3123123;
long long const INF = 1e9 + 7;
long long n, q;
long long cnt1, cnt2;
long long side;
long long ans[N];
void change() {
  if (side == 1)
    side = 2;
  else
    side = 1;
}
int main() {
  side = 1;
  scanf("%I64d %I64d", &n, &q);
  for (long long c = 1; c <= q; c++) {
    long long type, x;
    scanf("%I64d", &type);
    if (type == 1) {
      scanf("%I64d", &x);
      cnt1 += x;
      cnt2 += x;
      if (labs(x) % 2 == 1) {
        change();
      }
    } else {
      if (side == 1) {
        cnt1++;
        cnt2--;
      } else {
        cnt1--;
        cnt2++;
      }
      change();
    }
  }
  cnt1 %= n;
  cnt2 %= n;
  for (long long c = 1; c <= n; c++) {
    long long newpos = c;
    if (c % 2 == 1)
      newpos += cnt1;
    else
      newpos += cnt2;
    if (newpos > n)
      newpos -= n;
    else if (newpos < 1)
      newpos += n;
    ans[newpos] = c;
  }
  for (long long c = 1; c <= n; c++) {
    printf("%I64d ", ans[c]);
  }
  return 0;
}
