require 'pp'
$t = Array.new(16).map{Array.new(16, 0)}
$t[1][1] = 1
#pp $t
$vert = Array.new(16).map{Array.new(16, true)}
$horiz = Array.new(16).map{Array.new(16, true)}

def input_matatabi()
	a = gets.chomp.split(" ").map{|str| str.to_i}
	if a[0] = a[2]
		$vert[a[0] + 1][[a[1], a[3]].max] = false
	else
		$horiz[[a[0], a[2].max], a[1]] = false
	end
end

def calc_t()
	for i in 1..15
		for j in 1..15
			if $vert[i][j - 1]
				$t[i][j] += $t[i][j - 1]
			end
			if $horiz[i - 1][j]
				$t[i][j] += $t[i - 1][j]
			end
		end
	end
end

n = gets.chomp.to_i
gx, gy = gets.chomp.split(" ").map{|str| str.to_i}
num_matatabi = gets.chomp.to_i

num_matatabi.times do
	input_matatabi
end

calc_t()

if ($t[gx + 1][gy + 1] == 0)
	puts "Miserable Hokusai!"
else
	puts $t[gx + 1][gy + 1]
end

#pp $t