gets.to_i.times{
  xMax,yMax=gets.split(" ").map{|e|e.to_i}
  matatabi=[]
  gets.to_i.times{
    x1,y1,x2,y2=gets.split(" ").map{|e|e.to_i}
    matatabi.push [x1,y1,x2,y2]
    matatabi.push [x2,y2,x1,y1]
  }
  map=Array.new(yMax+1)
  map.length.times{|t|map[t]=Array.new(xMax+1, 0)}
  map[0][0]=1
  (yMax+1).times{|t1|
    (xMax+1).times{|t2|
      uFlag=true
      lFlag=true
      uFlag=false if matatabi.count([t2,t1-1,t2,t1])!=0
      lFlag=false if matatabi.count([t2-1,t1,t2,t1])!=0
      map[t1][t2]+=map[t1][t2-1] if !uFlag&&lFlag
      map[t1][t2]+=map[t1-1][t2] if uFlag&&!lFlag
      map[t1][t2]+=0 if !uFlag&&!lFlag
      map[t1][t2]+=map[t1-1][t2]+map[t1][t2-1] if uFlag&&lFlag
    }
  }
  p map[yMax][xMax] if map[yMax][xMax]!=0
  puts "Miserable Hokusai!" if map[yMax][xMax]==0
}