#include <bits/stdc++.h>

using namespace std;


int main()
{
  int H, W, N;
  cin >> H >> W >> N;
  vector< int > vc[200000];
  for(int i = 0; i < N; i++) {
    int a, b;
    cin >> a >> b;
    vc[--a].emplace_back(--b);
  }
  vector< int > beet(W);
  iota(begin(beet), end(beet), 0);

  auto getPos = [&](int height, int row)
  {
    height %= 2 * W;
    while(height > 0) {
      int temp = 0;
      if((height + row) % 2 == 0) temp = -min(height, row);
      else temp = min(height, W - row - 1);
      row += temp;
      height -= abs(temp);
      --height;
    }
    return (row);
  };

  for(int i = 0; i < H; i++) {
    for(auto &c : vc[i]) swap(beet[getPos(i, c)], beet[getPos(i, c + 1)]);
  }

  vector< int > ans(W);
  for(int i = 0; i < W; i++) {
    ans[beet[getPos(H, i)]] = i + 1;
  }
  for(auto &s : ans) cout << s << endl;

}