As indicated in Martijn's comment and kindall's answer, you are running into the mutable default argument behavior which bites most Python developers at some point, here is how you can modify Node.__init__()
so that it works the way you expect:
class Node(object):
def __init__(self, value = 0, children = None):
self.val = value
if children is None:
self.children = {}
else:
self.children = children