#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long n, r;
  cin >> n >> r;
  long long ans = 0;
  long long sev = 0;
  long long sod = 0;
  long long flag = 0;
  long long x, y;
  for (long long i = 1; i <= r; i++) {
    cin >> x;
    if (x == 1) {
      cin >> y;
      ans += y;
      if (y % 2 == 0) {
        continue;
      } else {
        flag = 1 - flag;
      }
    } else {
      if (flag == 0) {
        sev--;
        sod++;
        flag = 1;
      } else {
        sod--;
        sev++;
        flag = 0;
      }
    }
  }
  long long pos[1000005];
  for (long long i = 1; i <= n; i++) {
    long long j = i;
    if (j % 2 == 0) {
      j = j + ans + sev;
      j = (j + (r + 1) * n) % n;
      if (j == 0) j = n;
    } else {
      j = j + ans + sod;
      j = (j + (r + 1) * n) % n;
      if (j == 0) j = n;
    }
    pos[j] = i;
  }
  for (long long i = 1; i <= n; i++) cout << pos[i] << " ";
}
