#include <iostream>
#include <cstring>
using namespace std;
int m[17][17][3];
int main()
{
  int s,x,y,p,x1,y1,x2,y2,i,j;
  cin >> s;
  while(s--){
    memset(m,0,sizeof(m));
    cin >> x >> y >> p;
    x++; y++;
    while(p--){
      cin >> x1 >> y1 >> x2 >> y2;
      if(x1 != x2){
	if(x1 > x2) m[y1+1][x1+1][1] = 1;
	else m[y1+1][x2+1][1] = 1;
      }else{
	if(y1 > y2) m[y1+1][x1+1][2] = 1;
	else m[y2+1][x1+1][2] = 1;
      }
    }
    m[1][1][0] = 1;
    for(i=1;i<=y;i++){
      for(j=1;j<=x;j++){
	if(m[i][j][1] == 0) m[i][j][0] += m[i][j-1][0];
	if(m[i][j][2] == 0) m[i][j][0] += m[i-1][j][0];
      }
    }
    if(m[y][x][0]) cout << m[y][x][0] << endl;
    else cout << "Miserable Hokusai!" << endl;
  }
  return 0;
}