Hint 1
To find out how to make both the top and bottom cogs turn in the same direction, try following the cogs from one end to the other, checking the direction of each one.
You do realise that two adjacent cogs always turn in opposite directions, don't you?

