awesome solution to my problem @MisterMiyagi, 900 lines of code vs 5 :P
I couldn't understand your solution, though, @Kevin, even though I now know understand how lambdas, recursive functions and defaultdict work, more or less. How exactly is a line like `d[1][2][3] = 4` calling the recursive function? Also, if there was another value registered before like let's say `d[1][5] = 3`, wouldn't your function 'override' it? (erase)