class KeyValueStorage:
    def __init__(self, path):
        with open(path, "r") as file:
            data = file.read().splitlines()

            for line in data:
                key, value = line.split("=")

                if not key.isidentifier():
                    raise ValueError("Wrong key!")

                if value.isdigit():
                    value = int(value)

                if key not in self.__dict__:
                    setattr(self, key, value)

    def __getitem__(self, key):
        return self.__dict__.get(key, None)


if __name__ == "__main__":

    storage = KeyValueStorage("task1.txt")
    print(storage["name"])
    print(storage.song)
    print(storage.power)

b0536f628c48254d64e428401bd5a13ca1b07c30
class KeyValueStorage:
    <mask token>
    <mask token>


<mask token>

class KeyValueStorage:
    <mask token>

    def __getitem__(self, key):
        return self.__dict__.get(key, None)


<mask token>

class KeyValueStorage:

    def __init__(self, path):
        with open(path, 'r') as file:
            data = file.read().splitlines()
            for line in data:
                key, value = line.split('=')
                if not key.isidentifier():
                    raise ValueError('Wrong key!')
                if value.isdigit():
                    value = int(value)
                if key not in self.__dict__:
                    setattr(self, key, value)

    def __getitem__(self, key):
        return self.__dict__.get(key, None)


<mask token>

class KeyValueStorage:

    def __init__(self, path):
        with open(path, 'r') as file:
            data = file.read().splitlines()
            for line in data:
                key, value = line.split('=')
                if not key.isidentifier():
                    raise ValueError('Wrong key!')
                if value.isdigit():
                    value = int(value)
                if key not in self.__dict__:
                    setattr(self, key, value)

    def __getitem__(self, key):
        return self.__dict__.get(key, None)


if __name__ == '__main__':
    storage = KeyValueStorage('task1.txt')
    print(storage['name'])
    print(storage.song)
    print(storage.power)

class KeyValueStorage:
    def __init__(self, path):
        with open(path, "r") as file:
            data = file.read().splitlines()

            for line in data:
                key, value = line.split("=")

                if not key.isidentifier():
                    raise ValueError("Wrong key!")

                if value.isdigit():
                    value = int(value)

                if key not in self.__dict__:
                    setattr(self, key, value)

    def __getitem__(self, key):
        return self.__dict__.get(key, None)


if __name__ == "__main__":

    storage = KeyValueStorage("task1.txt")
    print(storage["name"])
    print(storage.song)
    print(storage.power)
