#include <bits/stdc++.h>
const int MEMORY_LIMIT_MB = 250;
const int TIME_LIMIT_S = 1;
const char input_filename[] = "";
const char output_filename[] = "";
using namespace std;
template <typename T, typename U>
ostream &operator<<(ostream &out, const pair<T, U> &p) {
  out << p.first << ' ' << p.second;
  return out;
}
template <typename T, typename U>
istream &operator>>(istream &in, pair<T, U> &p) {
  in >> p.first >> p.second;
  return in;
}
template <typename T>
class vec : public vector<T> {
 public:
  using vector<T>::vector;
  inline const T operator[](size_t x) const { return this->at(x); }
  inline T &operator[](size_t x) { return this->at(x); }
};
template <>
class vec<bool> : public vector<bool> {
  using vector<bool>::vector;

 public:
  inline const_reference operator[](size_t x) const { return this->at(x); }
  inline reference operator[](size_t x) { return this->at(x); }
};
template <typename T>
inline ostream &operator<<(ostream &out, const vec<T> &v) {
  if (v.empty()) return out;
  out << v.front();
  for (auto it = ++v.begin(); it != v.end(); ++it) out << ' ' << *it;
  return out;
}
template <typename T>
inline istream &operator>>(istream &in, vec<T> &v) {
  for (auto &i : v) in >> i;
  return in;
}
template <typename T>
inline ostream &operator<<(ostream &out, const vector<T> &v) {
  if (v.empty()) return out;
  out << v.front();
  for (auto it = ++v.begin(); it != v.end(); ++it) out << ' ' << *it;
  return out;
}
template <typename T>
inline istream &operator>>(istream &in, vector<T> &v) {
  for (auto &i : v) in >> i;
  return in;
}
class Reader {
 public:
  inline Reader(const string &filename) {
    cin.tie(nullptr);
    ios_base::sync_with_stdio(false);
    if (not filename.empty())
      assert(freopen(filename.c_str(), "r", stdin) != nullptr);
  }
  template <typename T>
  inline void operator()(T &x) {
    cin >> x;
  }
  template <typename T, typename... Args>
  inline void operator()(T &x, Args &...args) {
    operator()(x), operator()(args...);
  }
};
Reader rd(input_filename);
class Printer {
 public:
  inline Printer(const string &filename) {
    if (not filename.empty())
      assert(freopen(filename.c_str(), "w", stdout) != nullptr);
  }
  template <typename T>
  inline void out(const T x) {
    cout << x;
  }
  template <typename T, typename... Args>
  inline void out(const T x, const Args... args) {
    out(x), out(args...);
  }
  inline void operator()() { out('\n'); }
  template <typename T>
  inline void operator()(const T x) {
    out(x), out('\n');
  }
  template <typename T, typename... Args>
  inline void operator()(const T x, const Args... args) {
    out(x), out(' '), operator()(args...);
  };
};
Printer pr(output_filename);
class Solution {
 public:
  inline void solve() {
    int n, q;
    scanf("%d %d", &n, &q);
    int odd = 0;
    int even = 0;
    bool f = false;
    for (int i = 0; i < q; ++i) {
      int t;
      scanf("%d", &t);
      if (t == 1) {
        int x;
        scanf("%d", &x);
        (even += x + n) %= n;
        (odd += x + n) %= n;
        if ((x + n) % 2 == 1) {
          f = !f;
        }
      } else {
        if (f) {
          (odd += 1) %= n;
          (even += -1 + n) %= n;
        } else {
          (odd += -1 + n) %= n;
          (even += 1) %= n;
        }
        f = !f;
      }
    }
    static int v[1000228];
    for (int i = 0; i < n; ++i) {
      if ((i & 1) == 0) {
        v[(i + even) % n] = i + 1;
      } else {
        v[(i + odd) % n] = i + 1;
      }
    }
    for (int i = 0; i < n; ++i) {
      printf("%d ", v[i]);
    }
    printf("\n");
  }
  Solution() {}
  ~Solution() {}

 private:
};
int main() {
  auto s = new Solution;
  s->solve();
  delete s;
}
