#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, q, t, x;
  long long temp;
  scanf("%d%d", &n, &q);
  long long temp_odd = 0, temp_even = 0;
  int flag_odd = 0, flag_even = 1;
  for (int i = 1; i <= q; i++) {
    scanf("%d", &t);
    if (t == 1) {
      scanf("%d", &x);
      if (flag_odd == 1) {
        if (x % 2 == 0) {
          flag_odd = 1;
          temp_odd += x;
        } else {
          flag_odd = 0;
          temp_odd += x;
        }
      } else {
        if (x % 2 == 0) {
          flag_odd = 0;
          temp_odd += x;
        } else {
          flag_odd = 1;
          temp_odd += x;
        }
      }
      if (flag_even == 1) {
        if (x % 2 == 0) {
          flag_even = 1;
          temp_even += x;
        } else {
          flag_even = 0;
          temp_even += x;
        }
      } else {
        if (x % 2 == 0) {
          flag_even = 0;
          temp_even += x;
        } else {
          flag_even = 1;
          temp_even += x;
        }
      }
    } else {
      if (flag_odd == 1) {
        temp_odd--;
        flag_odd = 0;
      } else {
        temp_odd++;
        flag_odd = 1;
      }
      if (flag_even == 1) {
        temp_even--;
        flag_even = 0;
      } else {
        temp_even++;
        flag_even = 1;
      }
    }
  }
  int ans[n + 1];
  for (int i = 1; i <= n; i++) {
    if (i % 2 == 0) {
      temp = i + temp_even;
      if (temp < (-n)) temp %= n;
      if (temp < 0) temp += (n);
      if (temp > n) temp %= n;
      if (temp == 0) temp += n;
      ans[temp] = i;
    } else {
      temp = i + temp_odd;
      if (temp < (-n)) temp %= n;
      if (temp < 0) temp += (n);
      if (temp > n) temp %= n;
      if (temp == 0) temp += n;
      ans[temp] = i;
    }
  }
  for (int i = 1; i <= n; i++) {
    printf("%d ", ans[i]);
  }
  printf("\n");
  return 0;
}
