/**
* Dont raise your voice, improve your argument.
* --Desmond Tutu
*/
#include <bits/stdc++.h>
using namespace std;
typedef unsigned int uint;
typedef long long ll;
int main() {
int n, q;
n = 100000, q = 100000;
//cin>>n>>q;
vector<int> a(n);
vector<char> s(q);
vector<int> x(q);
for(auto &c : a)
c = 1;
//cin>>c;
for(int i=0; i<q; i++) {
string str;
//cin>>str>>x[i];
str = i % 2 == 0 ? ">" : "<";
x[i] = i % 2 == 0 ? -i : i;
s[i]=str[0];
}
for(int i=0; i<n; i++) {
if(a[i]==0)
continue;
int la=abs(a[i]);
int j;
int flip=0;
for(j=q-1; j>=0; j--) {
if(abs(x[j])<la) {
if(s[j]=='>') {
a[i]=-abs(a[i]);
} else {
a[i]=abs(a[i]);
}
//cout<<"set a[i] at j="<<j<<" to a[i]="<<a[i]<<endl;
j++;
break;
} else if(abs(x[j])==la) {
if(s[j]=='<' && x[j]>0) {
a[i]=abs(a[i]);
j++;
break;
} else if(s[j]=='>' && x[j]<0) {
a[i]=-abs(a[i]);
j++;
break;
}
} else {
if(s[j]=='<' && x[j]>0)
flip++;
else if(s[j]=='>' && x[j]<0)
flip++;
}
}
//cout<<"i="<<i<<" j="<<j<<" flip="<<flip<<endl;
if(flip%2==1)
a[i]=-a[i];
/*
for(; j<q; j++) {
if( ((s[j]=='<') && (a[i]<x[j])) || ((s[j]=='>') && (a[i]>x[j]) )) {
//cout<<"flip a[i], i="<<i<< " a[i]="<<a[i]<<endl;
a[i]=-a[i];
}
}
*/
}
for(int i=0; i<n; i++)
cout<<a[i]<<" ";
cout<<endl;
}
LyoqIAogKiBEb250IHJhaXNlIHlvdXIgdm9pY2UsIGltcHJvdmUgeW91ciBhcmd1bWVudC4KICogLS1EZXNtb25kIFR1dHUKICovCgojaW5jbHVkZSA8Yml0cy9zdGRjKysuaD4KdXNpbmcgbmFtZXNwYWNlIHN0ZDsKdHlwZWRlZiB1bnNpZ25lZCBpbnQgdWludDsKdHlwZWRlZiBsb25nIGxvbmcgbGw7CgppbnQgbWFpbigpIHsKICAgIGludCBuLCBxOwogICAgbiA9IDEwMDAwMCwgcSA9IDEwMDAwMDsKICAgIC8vY2luPj5uPj5xOwogICAgdmVjdG9yPGludD4gYShuKTsKICAgIHZlY3RvcjxjaGFyPiBzKHEpOwogICAgdmVjdG9yPGludD4geChxKTsKCiAgICBmb3IoYXV0byAmYyA6IGEpCiAgICAgICAgYyA9IDE7CiAgICAgICAgLy9jaW4+PmM7CiAgICAgICAgCgogICAgZm9yKGludCBpPTA7IGk8cTsgaSsrKSB7CiAgICAgICAgc3RyaW5nIHN0cjsKICAgICAgICAvL2Npbj4+c3RyPj54W2ldOwogICAgICAgIHN0ciA9IGkgJSAyID09IDAgPyAiPiIgOiAiPCI7CiAgICAgICAgeFtpXSA9IGkgJSAyID09IDAgPyAtaSA6IGk7CiAgICAgICAgc1tpXT1zdHJbMF07CiAgICB9CiAgICAKICAgIGZvcihpbnQgaT0wOyBpPG47IGkrKykgewogICAgICAgIGlmKGFbaV09PTApCiAgICAgICAgICAgIGNvbnRpbnVlOwogICAgICAgIAogICAgICAgIGludCBsYT1hYnMoYVtpXSk7CiAgICAgICAgaW50IGo7CiAgICAgICAgaW50IGZsaXA9MDsKICAgICAgICBmb3Ioaj1xLTE7IGo+PTA7IGotLSkgewogICAgICAgICAgICBpZihhYnMoeFtqXSk8bGEpIHsKICAgICAgICAgICAgICAgIGlmKHNbal09PSc+JykgewogICAgICAgICAgICAgICAgICAgIGFbaV09LWFicyhhW2ldKTsKICAgICAgICAgICAgICAgIH0gZWxzZSB7CiAgICAgICAgICAgICAgICAgICAgYVtpXT1hYnMoYVtpXSk7CiAgICAgICAgICAgICAgICB9Ci8vY291dDw8InNldCBhW2ldIGF0IGo9Ijw8ajw8IiB0byBhW2ldPSI8PGFbaV08PGVuZGw7CiAgICAgICAgICAgICAgICBqKys7CiAgICAgICAgICAgICAgICBicmVhazsKICAgICAgICAgICAgfSBlbHNlIGlmKGFicyh4W2pdKT09bGEpIHsKICAgICAgICAgICAgICAgIGlmKHNbal09PSc8JyAmJiB4W2pdPjApICB7CiAgICAgICAgICAgICAgICAgICAgYVtpXT1hYnMoYVtpXSk7CiAgICAgICAgICAgICAgICAgICAgaisrOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfSBlbHNlIGlmKHNbal09PSc+JyAmJiB4W2pdPDApIHsKICAgICAgICAgICAgICAgICAgICBhW2ldPS1hYnMoYVtpXSk7CiAgICAgICAgICAgICAgICAgICAgaisrOwogICAgICAgICAgICAgICAgICAgIGJyZWFrOwogICAgICAgICAgICAgICAgfQogICAgICAgICAgICB9IGVsc2UgewogICAgICAgICAgICAgICAgaWYoc1tqXT09JzwnICYmIHhbal0+MCkKICAgICAgICAgICAgICAgICAgICBmbGlwKys7CiAgICAgICAgICAgICAgICBlbHNlIGlmKHNbal09PSc+JyAmJiB4W2pdPDApCiAgICAgICAgICAgICAgICAgICAgZmxpcCsrOwogICAgICAgICAgICB9CiAgICAgICAgfQovL2NvdXQ8PCJpPSI8PGk8PCIgaj0iPDxqPDwiIGZsaXA9Ijw8ZmxpcDw8ZW5kbDsKICAgICAgICBpZihmbGlwJTI9PTEpCiAgICAgICAgICAgIGFbaV09LWFbaV07CgovKgogICAgICAgIGZvcig7IGo8cTsgaisrKSAgewogICAgICAgICAgICBpZiggKChzW2pdPT0nPCcpICYmIChhW2ldPHhbal0pKSB8fCAoKHNbal09PSc+JykgJiYgKGFbaV0+eFtqXSkgKSkgewovL2NvdXQ8PCJmbGlwIGFbaV0sIGk9Ijw8aTw8ICIgYVtpXT0iPDxhW2ldPDxlbmRsOwogICAgICAgICAgICAgICAgYVtpXT0tYVtpXTsKICAgICAgICAgICAgfQogICAgICAgIH0KKi8KICAgIH0KCiAgICBmb3IoaW50IGk9MDsgaTxuOyBpKyspIAogICAgICAgIGNvdXQ8PGFbaV08PCIgIjsKICAgIGNvdXQ8PGVuZGw7CgoKfQo=