#include <bits/stdc++.h>
using namespace std;
const long long maxn = 1e6 + 5, inf = 1e18, mod = 1e9 + 7;
long long n, q, a[maxn];
int main() {
  ios::sync_with_stdio(false), cin.tie(0), cout.tie(0);
  cin >> n >> q;
  long long p1 = 0, p2 = 1;
  while (q--) {
    long long x;
    cin >> x;
    if (x == 2) {
      p1 ^= 1;
      p2 ^= 1;
      continue;
    }
    long long y;
    cin >> y;
    p1 += y;
    p2 += y;
    if (p1 < 0) p1 += n;
    if (p1 >= n) p1 -= n;
    if (p2 < 0) p2 += n;
    if (p2 >= n) p2 -= n;
  }
  long long x = 1, y = p1;
  while (x < n) {
    a[y] = x;
    x += 2;
    y += 2;
    if (y >= n) y -= n;
  }
  x = 2;
  y = p2;
  while (x <= n) {
    a[y] = x;
    x += 2;
    y += 2;
    if (y >= n) y -= n;
  }
  for (long long i = 0; i < n; i++) cout << a[i] << ' ';
}
