#include <bits/stdc++.h>
using namespace std;
int arr[1000010 + 1];
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, q, x, y, a, b, l;
  cin >> n >> q;
  x = 0;
  y = 1;
  while (q--) {
    cin >> a;
    if (a == 1) {
      cin >> b;
      x += b;
      if (x < 0) x += n;
      x %= n;
      y += b;
      if (y < 0) y += n;
      y %= n;
    } else {
      if (x % 2) {
        x--;
        if (x < 0) x += n;
        y++;
        y %= n;
      } else {
        y--;
        if (y < 0) y += n;
        x++;
        x %= n;
      }
    }
  }
  a = x;
  l = 1;
  do {
    arr[a] = l;
    l += 2;
    a += 2;
    a %= n;
  } while (a != x);
  b = y;
  l = 2;
  do {
    arr[b] = l;
    l += 2;
    b += 2;
    b %= n;
  } while (b != y);
  for (int i = 0; i < n; i++) cout << arr[i] << " ";
  cout << "\n";
  return 0;
}
