#include<iostream>
using namespace std;
int x[10000],n,q;
int main(){
cin>>n>>q;
for(int i=0;i<q;i++){
int a,b;cin>>a>>b;
for(int j=a;j>=1;j--){
if(j==1 || x[j]<x[j-1]){x[j]++;break;}
}
}
for(int i=1;i<=n;i++)cout<<x[i]<<endl;
return 0;
}
I2luY2x1ZGU8aW9zdHJlYW0+CnVzaW5nIG5hbWVzcGFjZSBzdGQ7CmludCB4WzEwMDAwXSxuLHE7CmludCBtYWluKCl7CgljaW4+Pm4+PnE7Cglmb3IoaW50IGk9MDtpPHE7aSsrKXsKCQlpbnQgYSxiO2Npbj4+YT4+YjsKCQlmb3IoaW50IGo9YTtqPj0xO2otLSl7CgkJCWlmKGo9PTEgfHwgeFtqXTx4W2otMV0pe3hbal0rKzticmVhazt9CgkJfQoJfQoJZm9yKGludCBpPTE7aTw9bjtpKyspY291dDw8eFtpXTw8ZW5kbDsKCXJldHVybiAwOwp9