#include <bits/stdc++.h>
using namespace std;
struct _io {
  char c;
  int precision = 6;
  _io operator>>(int &x) {
    scanf("%d", &x);
    return *this;
  }
  _io operator>>(long long &x) {
    scanf("%lld", &x);
    return *this;
  }
  _io operator>>(double &x) {
    scanf("%lf", &x);
    return *this;
  }
  _io operator>>(char &x) {
    scanf("%c", &x);
    return *this;
  }
  _io operator>>(char *x) {
    scanf("%s", x);
    return *this;
  }
  _io operator>>(string &x) {
    c = getchar();
    while (!isalnum(c) && c != EOF) c = getchar();
    while (isalnum(c)) {
      x.push_back(c);
      c = getchar();
    };
    return *this;
  }
  _io operator<<(int x) {
    printf("%d", x);
    return *this;
  }
  _io operator<<(long long x) {
    printf("%lld", x);
    return *this;
  }
  _io operator<<(double x) {
    printf("%.*f", precision, x);
    return *this;
  }
  _io operator<<(char x) {
    printf("%c", x);
    return *this;
  }
  _io operator<<(char *x) {
    printf("%s", x);
    return *this;
  }
  _io operator<<(const char *x) {
    printf("%s", x);
    return *this;
  }
  _io operator<<(const string &x) {
    printf("%s", x.c_str());
    return *this;
  }
} io;
int main() {
  int n, q;
  io >> n >> q;
  int odd = 0, even = 0;
  for (int i = 0; i < q; i++) {
    int t;
    io >> t;
    if (t == 2) {
      odd += -2 * (odd % 2) + 1;
      even += -2 * ((even + 1) % 2) + 1;
    } else {
      int d;
      io >> d;
      odd += d;
      even += d;
    }
    odd = (n + odd - 1) % n + 1;
    even = (n + even - 1) % n + 1;
  }
  for (int i = 1; i <= n; i++) {
    if (i % 2 != odd % 2)
      io << (i + n - odd - 1) % n + 1;
    else
      io << (i + n - even - 1) % n + 1;
    io << ' ';
  }
  io << '\n';
}
