#include <bits/stdc++.h>
using namespace std;
const int N = 1e6 + 6;
int a[N], ar[N];
int main() {
  int n;
  cin >> n;
  int a0 = 0, a1 = 1, m;
  cin >> m;
  for (int i = 0; i < m; ++i) {
    int t, x;
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      a0 = (a0 + x + n) % n;
      a1 = (a1 + x + n) % n;
    } else {
      if (a0 % 2 == 0)
        a0++, a1--;
      else
        a0--, a1++;
    }
  }
  for (int i = 0; i < n; i += 2) {
    a[i] = a0;
    a0 += 2;
    if (a0 >= n) a0 -= n;
    a[i + 1] = a1;
    a1 += 2;
    if (a1 >= n) a1 -= n;
    ar[a[i]] = i;
    ar[a[i + 1]] = i + 1;
  }
  for (int i = 0; i < n; ++i) printf("%d ", ar[i] + 1);
  cout << endl;
  return 0;
}
