import collections
d1 = {'a': 'AA', 'c': 'CC', 'd': 'EE'}
d2 = {'b': 'BB', 'c': 'DD', 'f': 'GG'}
cm = collections.ChainMap(d1, d2)
cm['AA'] = 'PYTHON'
cm['DD'] = 'PHP'
print(format(cm['AA']))
print(format(cm['DD']))
print(d1)
print(d2)
'''
run:
PYTHON
PHP
{'a': 'AA', 'c': 'CC', 'd': 'EE', 'AA': 'PYTHON', 'DD': 'PHP'}
{'b': 'BB', 'c': 'DD', 'f': 'GG'}
'''