import java.io.*;
import java.util.*;

public class rgl_onlymentioned {
  public static void main(String[] args) throws IOException {
    final BufferedReader br = new BufferedReader(new InputStreamReader(System.in));

    final String[] nmk = br.readLine().split(" ");
    final int n = Integer.parseInt(nmk[0]);
    final int m = Integer.parseInt(nmk[1]);
    final int k = Integer.parseInt(nmk[2]);

    final int[] open = new int[m];
    final Map<Integer, Integer> costs = new TreeMap<>();

    for (int i=0; i<k; i++) {
      final String[] pc = br.readLine().split(" ");
      final int p = Integer.parseInt(pc[0]);
      final int c = Integer.parseInt(pc[1]);
      if (!costs.containsKey(c-1)) {
        costs.put(c-1, 0);
      }
      if (open[c-1] != 0) {
        if (open[c-1] != p) {
          costs.put(c-1, costs.get(c-1) + Math.abs(p - open[c-1]) - 100);
        }
        open[c-1] = 0;
      } else {
        open[c-1] = p;
        costs.put(c-1, costs.get(c-1) + 100);
      }
    }

    for (Map.Entry<Integer, Integer> i : costs.entrySet()) {
      System.out.print(" " + i.getValue());
    }
    System.out.println();
  }
}
