#include <bits/stdc++.h>
using namespace std;
int ans[1000010];
int main(int argc, const char* argv[]) {
  int n, q;
  cin >> n >> q;
  int first = 0;
  int second = 1;
  for (int i = 0; i < q; i++) {
    int x, d;
    scanf("%d", &x);
    if (x == 1) {
      scanf("%d", &d);
      first = (first + n + d) % n;
      second = (second + n + d) % n;
    } else {
      if (first % 2 == 0) {
        first += 1;
        first %= n;
      } else {
        first = first + n - 1;
        first %= n;
      }
      if (second % 2 == 0) {
        second += 1;
        second %= n;
      } else {
        second = second + n - 1;
        second %= n;
      }
    }
  }
  ans[first] = 0;
  ans[second] = 1;
  int lastf = 0;
  int lasts = 1;
  for (int i = first + 2; i < n; i += 2) {
    ans[i] = (ans[i - 2] + 2) % n;
    lastf = ans[i];
  }
  for (int i = first % 2; i < first; i += 2) {
    if (i < 2) {
      ans[i] = lastf + 2;
    } else {
      ans[i] = (ans[i - 2] + 2) % n;
    }
  }
  for (int i = second + 2; i < n; i += 2) {
    ans[i] = (ans[i - 2] + 2) % n;
    lasts = ans[i];
  }
  for (int i = second % 2; i < second; i += 2) {
    if (i < 2) {
      ans[i] = lasts + 2;
    } else {
      ans[i] = (ans[i - 2] + 2) % n;
    }
  }
  for (int i = 0; i < n; i++) {
    printf("%d ", ans[i] + 1);
  }
  return 0;
}
