#include <bits/stdc++.h>   int n, m, op, det;   int dir[2];   long long mv[2];   int ans[1111111];   int main() {     scanf( %d%d , &n, &m);     dir[1] = 1;     dir[0] = -1;     mv[1] = mv[0] = 0LL;     for (int i = 0; i < m; i++) {       scanf( %d , &op);       if (op == 1) {         scanf( %d , &det);         mv[1] += det;         mv[0] += det;         if (det % 2) {           dir[1] = -dir[1];           dir[0] = -dir[0];         }       } else {         mv[1] += dir[1];         mv[0] += dir[0];         dir[1] = -dir[1];         dir[0] = -dir[0];       }     }     mv[1] %= n;     if (mv[1] < 0) mv[1] += n;     mv[0] %= n;     if (mv[0] < 0) mv[0] += n;     for (int i = 1; i <= n; i++) {       int id = i % 2;       int p = i + mv[id];       if (p > n) p -= n;       ans[p] = i;     }     for (int i = 1; i <= n; i++) printf( %d%c , ans[i], i < n ?     :   n );     return 0;   }   