import java.io.*; import java.util.HashMap; class Main{ public static void main(String[] args) throws IOException{ BufferedReader br=new BufferedReader(new InputStreamReader(System.in)); String line=""; while((line=br.readLine())!=null){ int w=Integer.parseInt(line); int h=Integer.parseInt(br.readLine()); int cnt=0; int matchcnt=0; int[] app=new int[h+1]; HashMap dic=new HashMap(); int n=Integer.parseInt(br.readLine()); for(int i=0;i