hey wait a minute............i am correct!!!!!!!!
i dont mean a monkey will choose his master but a monkey can have his master in m ways(since there are m masters)
hence my ans
plz check ur ans!!
in the ques each monkey has to have a master not every master to have a monkey
so we have to see frm the monkey's perspective
anyways the reverse cant bring the correct ans since when one master has chosen a monkey then n-1 monkeys are left for others
hence the ans n^m can never come!!!!