B wins if A doesnot win
winB = N * M - winA NEW_LINE if ( winA > winB ) : NEW_LINE INDENT return " A " NEW_LINE DEDENT elif ( winB > winA ) : NEW_LINE INDENT return " B " NEW_LINE DEDENT return " Draw " NEW_LINE