#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  long long int n, q;
  cin >> n >> q;
  long long int arr[3];
  arr[1] = 1;
  arr[2] = 2;
  int ans[n + 1];
  while (q--) {
    int c;
    cin >> c;
    if (c == 1) {
      int x;
      cin >> x;
      arr[1] = arr[1] + x;
      arr[2] = arr[2] + x;
    } else {
      if (arr[1] % 2 == 0) {
        arr[1]--;
      } else {
        arr[1]++;
      }
      if (arr[2] % 2 == 0) {
        arr[2]--;
      } else {
        arr[2]++;
      }
    }
  }
  arr[2] = arr[2] - 2;
  arr[1] = arr[1] - 1;
  arr[1] = arr[1] % n;
  arr[2] = arr[2] % n;
  arr[0] = arr[2];
  for (int i = 1; i <= n; i++) {
    if (i + arr[i % 2] <= 0) {
      ans[i + arr[i % 2] + n] = i;
    } else if (i + arr[i % 2] > n) {
      ans[i + arr[i % 2] - n] = i;
    } else {
      ans[i + arr[i % 2]] = i;
    }
  }
  for (int i = 1; i <= n; i++) cout << ans[i] << " ";
}
