#include <bits/stdc++.h>
using namespace std;
char buf[200];
pair<int, int> input_two() {
  fgets(buf, sizeof(buf), stdin);
  int p_sp = std::find(buf, buf + sizeof(buf), ' ') - buf;
  return make_pair(std::atoi(buf), std::atoi(buf + p_sp + 1));
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int n, q;
  std::tie(n, q) = input_two();
  long long base = 0;
  long long even = 0;
  for (int i = 0; i < q; i++) {
    fgets(buf, sizeof(buf), stdin);
    int type = std::atoi(buf);
    if (type == 1) {
      int p_sp = std::find(buf, buf + sizeof(buf), ' ') - buf;
      long long tmp = std::atoll(buf + p_sp + 1);
      base += tmp;
    } else {
      if ((base + even) % 2 == 0)
        even++;
      else
        even--;
    }
  }
  int* ans = new int[n];
  for (int i = 0; i < n; i++) {
    if (i % 2 == 0)
      ans[((((i + base + even) % (n)) + (n)) % (n))] = i;
    else
      ans[((((i + base - even) % (n)) + (n)) % (n))] = i;
  }
  for (int i = 0; i < n; i++) cout << ans[i] + 1 << " ";
  cout << endl;
  return 0;
}
