#include <bits/stdc++.h>
using namespace std;
inline bool checkBit(long long n, int i) { return n & (1LL << i); }
inline long long setBit(long long n, int i) {
  return n | (1LL << i);
  ;
}
inline long long resetBit(long long n, int i) { return n & (~(1LL << i)); }
int dx[] = {0, 0, +1, -1};
int dy[] = {+1, -1, 0, 0};
inline bool EQ(double a, double b) { return fabs(a - b) < 1e-9; }
int ans[1010000];
int main() {
  int n, q;
  scanf("%d%d", &n, &q);
  long long one = 0, two = 1;
  while (q--) {
    int d;
    scanf("%d", &d);
    if (d == 1) {
      int x;
      scanf("%d", &x);
      one += x;
      two += x;
    } else {
      if (one % 2 == 0)
        one++;
      else
        one--;
      if (two % 2 == 0)
        two++;
      else
        two--;
    }
  }
  one %= n;
  two %= n;
  if (one < 0) one += n;
  if (two < 0) two += n;
  ;
  for (int i = one, j = 1; j <= n; j += 2, i = (i + 2) % n) ans[i] = j;
  for (int i = two, j = 2; j <= n; j += 2, i = (i + 2) % n) ans[i] = j;
  for (int i = 0; i < n; ++i) printf("%d ", ans[i]);
  return 0;
}
