If A sees a thick, expensive, gold chain in a empty locker room, the best thing A should do is to notify the swimming centre staff, so the staff can keep it for the chain's owner. (if the chain's owner never come back to the swimming centre, the swimming centre can keep it).
The second best option is A take the chain but wear it everytime A comes for a swim, and hope the chain's owner can see it and then return the chain to the owner.
The third best thing A can do is take it but donate the gold chain to charity.
A can take the chain and keep it only if A is in need of money and does not have a stable income and have 5 children to support. (This option can be regarded as a divine gift if A is religious).
If A is a rich person, A must take option 1 and 2 to show goodness. If A takes it, it shows greed.
If A is very poor and a non religious person and has 5 children to feed, A should take it, but only for the reason of supporting A's family. This intention shows goodness and has nothing to do with religion.
If A was a thief, A must choose option 1 to show improvement in understanding of law.
If A sees it and does nothing, it is better than taking it (if A is rich). If A's reason is: the owner might come back, this is not a good reason because someone else may take it for selfish reasons.
If A is a child, say, 5 to 10 years old, well, the above does not apply to the child, but apply to the child's parents.
If A sees it and picks it up and throws it into the rubbish bin, this is not a wrong intention: to keep the floor clean, but return it to the owner is better!