Q1: Ask the second god, "If I asked you 'Is the first madman?', would you say hug?". If the second answers hug, either the second is madman (and is answering randomly), or the second is not madman and the answer indicates that the first is indeed madman. Either way, the third is not madman. If the second answers bah, either the second is madman (and is answering randomly), or the second is not Random and the answer indicates that the first is not madman. Either way, you know the identity of a god who is not madman.
Q2: Go to the god who was identified as not being madman by the previous question (either first or third), and ask him: "If I asked you 'Are you False?', would you say hug?". Since he is not madman, an answer of bah indicates that he is True and an answer of hug indicates that he is False.
Q3: Ask the same god the question: "If I asked you 'Is the second madman?', would you say hug?". If the answer is hug, the second is madman; if the answer is bah, the god you have not yet spoken to is maan. The remaining god can be identified by elimination.