import itertools, collections

value_to_numeric_map = collections.defaultdict(itertools.count().next)

print(value_to_numeric_map['a'])
# 0
print(value_to_numeric_map['b'])
# 1
print(value_to_numeric_map['c'])
# 2
print(value_to_numeric_map['a'])
# 0
print(value_to_numeric_map['b'])
# 1

3ac909ae57ac26470406293e5d028c60318c9bbd
<mask token>

<mask token>
print(value_to_numeric_map['a'])
print(value_to_numeric_map['b'])
print(value_to_numeric_map['c'])
print(value_to_numeric_map['a'])
print(value_to_numeric_map['b'])

<mask token>
value_to_numeric_map = collections.defaultdict(itertools.count().next)
print(value_to_numeric_map['a'])
print(value_to_numeric_map['b'])
print(value_to_numeric_map['c'])
print(value_to_numeric_map['a'])
print(value_to_numeric_map['b'])

import itertools, collections
value_to_numeric_map = collections.defaultdict(itertools.count().next)
print(value_to_numeric_map['a'])
print(value_to_numeric_map['b'])
print(value_to_numeric_map['c'])
print(value_to_numeric_map['a'])
print(value_to_numeric_map['b'])

import itertools, collections

value_to_numeric_map = collections.defaultdict(itertools.count().next)

print(value_to_numeric_map['a'])
# 0
print(value_to_numeric_map['b'])
# 1
print(value_to_numeric_map['c'])
# 2
print(value_to_numeric_map['a'])
# 0
print(value_to_numeric_map['b'])
# 1
