# your code goes here from collections import defaultdict from itertools import count d = defaultdict(count().__next__) d[1] d[2] d[3] d[1] print(d)
Standard input is empty
defaultdict(<method-wrapper '__next__' of itertools.count object at 0x2b086e07fc48>, {1: 0, 2: 1, 3: 2})