#include <bits/stdc++.h>
#define ll long long int
#define ull unsigned long long int
#define pb push_back
#define mp make_pair
#define vi vector<int>
#define vvi vector<vi>
#define Max(a,b) ((a)>(b)?(a):(b))
#define Min(a,b) ((a)<(b)?(a):(b))
#define rep(i,a,b) for(ll i=a;i<b;i++)
#define all(a) a.begin(),a.end()
#define sum(a) accumulate(all(a),0)
#define endl '\n'
#define hell 1000000007
using namespace std;
template <class X>
void input(vector<X>&a,int N){
X temp;
rep(i,0,N){
cin>>temp;
a.push_back(temp);
}
}
void solve(){
ll n,q;
cin>>n>>q;
ll oddmoves=0;
ll evenmoves=0;
rep(i,0,q){
ll ch;
cin>>ch;
if(ch==1){
ll temp;
cin>>temp;
oddmoves+=temp;
evenmoves+=temp;
}
else{
if(oddmoves%2==0){
oddmoves+=1;
evenmoves-=1;
}
else{
oddmoves-=1;
evenmoves+=1;
}
}
}
oddmoves=(oddmoves%n+n)%n;
evenmoves=(evenmoves%n+n)%n;
if(oddmoves%2==0){
int oddstart=(1-oddmoves+2*n)%n;
int evenstart=(2-evenmoves+2*n)%n;
rep(i,0,n/2){
if(evenstart==0)evenstart=n;
cout<<oddstart<<" "<<evenstart<<" ";
oddstart=(oddstart+2)%n;
evenstart=(evenstart+2)%n;
}
}
else{
int evenstart=(1-evenmoves+2*n)%n;
int oddstart=(2-oddmoves+2*n)%n;
rep(i,0,n/2){
if(evenstart==0)evenstart=n;
cout<<evenstart<<" "<<oddstart<<" ";
oddstart=(oddstart+2)%n;
evenstart=(evenstart+2)%n;
}
}
}
int main(){
ios_base::sync_with_stdio(false);
cin.tie(0);
cout.tie(0);
int t=1;
while(t--){
solve();
}
return 0;
}
I2luY2x1ZGUgPGJpdHMvc3RkYysrLmg+CiNkZWZpbmUgbGwgbG9uZyBsb25nIGludAojZGVmaW5lIHVsbCB1bnNpZ25lZCBsb25nIGxvbmcgaW50CiNkZWZpbmUgcGIgcHVzaF9iYWNrCiNkZWZpbmUgbXAgbWFrZV9wYWlyCiNkZWZpbmUgdmkgdmVjdG9yPGludD4KI2RlZmluZSB2dmkgdmVjdG9yPHZpPgojZGVmaW5lIE1heChhLGIpICgoYSk+KGIpPyhhKTooYikpCiNkZWZpbmUgTWluKGEsYikgKChhKTwoYik/KGEpOihiKSkKI2RlZmluZSByZXAoaSxhLGIpIGZvcihsbCBpPWE7aTxiO2krKykKI2RlZmluZSBhbGwoYSkgYS5iZWdpbigpLGEuZW5kKCkKI2RlZmluZSBzdW0oYSkgYWNjdW11bGF0ZShhbGwoYSksMCkKI2RlZmluZSBlbmRsICdcbicKI2RlZmluZSBoZWxsIDEwMDAwMDAwMDcKCnVzaW5nIG5hbWVzcGFjZSBzdGQ7CnRlbXBsYXRlIDxjbGFzcyBYPgp2b2lkIGlucHV0KHZlY3RvcjxYPiZhLGludCBOKXsKICAgIFggdGVtcDsKICAgIHJlcChpLDAsTil7CiAgICAgICAgY2luPj50ZW1wOwogICAgICAgIGEucHVzaF9iYWNrKHRlbXApOwogICAgfQp9CnZvaWQgc29sdmUoKXsKICAgIGxsIG4scTsKICAgIGNpbj4+bj4+cTsKICAgIGxsIG9kZG1vdmVzPTA7CiAgICBsbCBldmVubW92ZXM9MDsKICAgIHJlcChpLDAscSl7CiAgICAgICAgbGwgY2g7CiAgICAgICAgY2luPj5jaDsKICAgICAgICBpZihjaD09MSl7CiAgICAgICAgICAgIGxsIHRlbXA7CiAgICAgICAgICAgIGNpbj4+dGVtcDsKICAgICAgICAgICAgb2RkbW92ZXMrPXRlbXA7CiAgICAgICAgICAgIGV2ZW5tb3Zlcys9dGVtcDsKICAgICAgICB9CiAgICAgICAgZWxzZXsKICAgICAgICAgICAgaWYob2RkbW92ZXMlMj09MCl7CiAgICAgICAgICAgICAgICBvZGRtb3Zlcys9MTsKICAgICAgICAgICAgICAgIGV2ZW5tb3Zlcy09MTsKICAgICAgICAgICAgfQogICAgICAgICAgICBlbHNlewogICAgICAgICAgICAgICAgb2RkbW92ZXMtPTE7CiAgICAgICAgICAgICAgICBldmVubW92Z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