#include<bits/stdc++.h>
using namespace std;
int f[35][100003],n,m,k,l,r,a[1000005];
int judge (int idx){
int cnt=k,sum=idx;
for (int j=30;j>=0;j--) {
if (cnt>=(1<<j)){
cnt-=(1<<j);
sum=f[j][sum];
}
}
return sum;
}
int main(){
freopen("usaco_Feb_swap.in","r",stdin);
freopen("usaco_Feb_swap.out","w",stdout);
cin >> n >> m >> k;
for (int i=1;i<=n;i++) a[i]=i;
for (int i=1;i<=m;i++){
cin >> l >> r;
for (int j=l;j<=(l+r)/2;j++) swap(a[j],a[r-j+l]);
}
for (int i=1;i<=n;i++) f[0][i]=a[i];
for (int i=1;i<=30;i++) {
for (int j=1;j<=n;j++) {
f[i][j]=f[i-1][f[i-1][j]];
}
}
for (int i=1;i<=n;i++) cout << judge(i) <<endl;
return 0;
}