class Environment:

    def __init__(self, attributes, parent=None):
        self.attributes = attributes
        self.parent = parent

    def get(self, key, default):
        if key in self.attributes:
            return self.attributes.get(key, default)
        elif self.parent:
            return self.parent.get(key, default)
        else:
            return default

    def __getitem__(self, key):
        if key in self.attributes:
            return self.attributes[key]
        elif self.parent:
            return self.parent[key]
        else:
            raise KeyError(key)

    def __setitem__(self, key, value):
        self.attributes[key] = value

1e427311575df68c2f1a38f69abaf246abf0b884
class Environment:
    <mask token>
    <mask token>
    <mask token>
    <mask token>

class Environment:

    def __init__(self, attributes, parent=None):
        self.attributes = attributes
        self.parent = parent
    <mask token>
    <mask token>

    def __setitem__(self, key, value):
        self.attributes[key] = value

class Environment:

    def __init__(self, attributes, parent=None):
        self.attributes = attributes
        self.parent = parent

    def get(self, key, default):
        if key in self.attributes:
            return self.attributes.get(key, default)
        elif self.parent:
            return self.parent.get(key, default)
        else:
            return default
    <mask token>

    def __setitem__(self, key, value):
        self.attributes[key] = value

class Environment:

    def __init__(self, attributes, parent=None):
        self.attributes = attributes
        self.parent = parent

    def get(self, key, default):
        if key in self.attributes:
            return self.attributes.get(key, default)
        elif self.parent:
            return self.parent.get(key, default)
        else:
            return default

    def __getitem__(self, key):
        if key in self.attributes:
            return self.attributes[key]
        elif self.parent:
            return self.parent[key]
        else:
            raise KeyError(key)

    def __setitem__(self, key, value):
        self.attributes[key] = value
