You can encapsulate two dictionaries, one with your "keys" storing your values, and the other with your "values" storing your keys.
Then control access to them using several methods. Fast and superfluous overhead memory should not matter much.
Edit: just noticed that this is essentially the same as the previous answer: - /
source share