First off I'm not an electritition so if you take my advice and it shorts out and starts a fire it your a$$.
The hot lead from the plug goes to the UP ARROW. (Black wire)
The hot lead going to the fan goes to the DOWN ARROW. (Black wire)
the Common lead goes to the N. (white wire) It should not matter which wire white wire.
The last one combine both ground wires (Green) together and terminate them both under the last screw.