#include <bits/stdc++.h>
int main() {
  int n, q;
  scanf("%d %d", &n, &q);
  long long odd_change = 0, even_change = 0;
  long long total_change = 0;
  for (int query_index = 0; query_index < q; ++query_index) {
    int query_type;
    scanf("%d", &query_type);
    if (query_type == 1) {
      int distance;
      scanf("%d", &distance);
      odd_change += distance;
      even_change += distance;
      total_change += distance;
    } else {
      if (total_change % 2 == 0) {
        odd_change -= 1;
        even_change += 1;
      } else {
        odd_change += 1;
        even_change -= 1;
      }
      total_change += 1;
    }
  }
  std::vector<int> result(n);
  for (int i = 0; i < n; ++i) {
    if (i % 2 == 0) {
      result[(((i + even_change) % n) + n) % n] = i;
    } else {
      result[(((i + odd_change) % n) + n) % n] = i;
    }
  }
  for (long long i = 0; i < n; ++i) {
    printf("%d ", result[i] + 1);
  }
  printf("\n");
  return 0;
}
