from abc import ABC, abstractmethod
from collections import namedtuple

Data = namedtuple('Data', ['entity', 'attribute', 'value'])
Datom = namedtuple('Datom', ['entity', 'attribute', 'value', 'tx'])


class BaseIndex(ABC):

    @abstractmethod
    def insert(self, datom):
        pass
    
    @abstractmethod
    def get(self, key):
        pass


class EAVT(BaseIndex):
    def __init__(self):
        self.EAVT_index = {}
    
    def insert(self, datom):
        key = datom.entity

        if key in self.EAVT_index:
            self.EAVT_index[key][datom.attribute] = [datom.value, datom.tx]
        else:
            self.EAVT_index[key] = {}
            self.EAVT_index[key][datom.attribute] = [datom.value, datom.tx]

    def get(self, key):
        try:
            return self.EAVT_index[key]
        except Exception as e:
            raise e


class AEVT:
    def __init__(self):
        self.AEVT_index = {}
    
    def insert(self, datom):
        key = datom.attribute

        if key in self.AEVT_index:
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]
        else:
            self.AEVT_index[key] = {}
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]
   
    def get(self, key):
        try:
            return self.AEVT_index[key]
        except Exception as e:
            raise e


class VAET:
    def __init__(self):
        self.VAET_index = {}
    
    def insert(self, datom):
        key = datom.value

        if key in self.VAET_index:
            self.VAET_index[key][datom.attribute].append([datom.entity, datom.tx])
        else:
            self.VAET_index[key] = {}
            self.VAET_index[key][datom.attribute] = []
            self.VAET_index[key][datom.attribute].append([datom.entity, datom.tx])
    
    def get(self, key):
        try:
            return self.VAET_index[key]
        except Exception as e:
            raise e


class AVET:
    pass


class LogIndex:
    def __init__(self):
        self.log_index = []
    
    def insert(self, datom):
        self.log_index.append(datom)

3f8ab39df5977688f88b9925eabe9a598dfb2195
<mask token>


class VAET:

    def __init__(self):
        self.VAET_index = {}

    def insert(self, datom):
        key = datom.value
        if key in self.VAET_index:
            self.VAET_index[key][datom.attribute].append([datom.entity,
                datom.tx])
        else:
            self.VAET_index[key] = {}
            self.VAET_index[key][datom.attribute] = []
            self.VAET_index[key][datom.attribute].append([datom.entity,
                datom.tx])

    def get(self, key):
        try:
            return self.VAET_index[key]
        except Exception as e:
            raise e


class AVET:
    pass


class LogIndex:

    def __init__(self):
        self.log_index = []

    def insert(self, datom):
        self.log_index.append(datom)

<mask token>


class AEVT:

    def __init__(self):
        self.AEVT_index = {}

    def insert(self, datom):
        key = datom.attribute
        if key in self.AEVT_index:
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]
        else:
            self.AEVT_index[key] = {}
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]
    <mask token>


class VAET:

    def __init__(self):
        self.VAET_index = {}

    def insert(self, datom):
        key = datom.value
        if key in self.VAET_index:
            self.VAET_index[key][datom.attribute].append([datom.entity,
                datom.tx])
        else:
            self.VAET_index[key] = {}
            self.VAET_index[key][datom.attribute] = []
            self.VAET_index[key][datom.attribute].append([datom.entity,
                datom.tx])

    def get(self, key):
        try:
            return self.VAET_index[key]
        except Exception as e:
            raise e


class AVET:
    pass


class LogIndex:

    def __init__(self):
        self.log_index = []

    def insert(self, datom):
        self.log_index.append(datom)

<mask token>


class EAVT(BaseIndex):

    def __init__(self):
        self.EAVT_index = {}

    def insert(self, datom):
        key = datom.entity
        if key in self.EAVT_index:
            self.EAVT_index[key][datom.attribute] = [datom.value, datom.tx]
        else:
            self.EAVT_index[key] = {}
            self.EAVT_index[key][datom.attribute] = [datom.value, datom.tx]
    <mask token>


class AEVT:

    def __init__(self):
        self.AEVT_index = {}

    def insert(self, datom):
        key = datom.attribute
        if key in self.AEVT_index:
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]
        else:
            self.AEVT_index[key] = {}
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]

    def get(self, key):
        try:
            return self.AEVT_index[key]
        except Exception as e:
            raise e


class VAET:

    def __init__(self):
        self.VAET_index = {}

    def insert(self, datom):
        key = datom.value
        if key in self.VAET_index:
            self.VAET_index[key][datom.attribute].append([datom.entity,
                datom.tx])
        else:
            self.VAET_index[key] = {}
            self.VAET_index[key][datom.attribute] = []
            self.VAET_index[key][datom.attribute].append([datom.entity,
                datom.tx])

    def get(self, key):
        try:
            return self.VAET_index[key]
        except Exception as e:
            raise e


class AVET:
    pass


class LogIndex:

    def __init__(self):
        self.log_index = []

    def insert(self, datom):
        self.log_index.append(datom)

<mask token>
Data = namedtuple('Data', ['entity', 'attribute', 'value'])
Datom = namedtuple('Datom', ['entity', 'attribute', 'value', 'tx'])


class BaseIndex(ABC):

    @abstractmethod
    def insert(self, datom):
        pass

    @abstractmethod
    def get(self, key):
        pass


class EAVT(BaseIndex):

    def __init__(self):
        self.EAVT_index = {}

    def insert(self, datom):
        key = datom.entity
        if key in self.EAVT_index:
            self.EAVT_index[key][datom.attribute] = [datom.value, datom.tx]
        else:
            self.EAVT_index[key] = {}
            self.EAVT_index[key][datom.attribute] = [datom.value, datom.tx]

    def get(self, key):
        try:
            return self.EAVT_index[key]
        except Exception as e:
            raise e


class AEVT:

    def __init__(self):
        self.AEVT_index = {}

    def insert(self, datom):
        key = datom.attribute
        if key in self.AEVT_index:
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]
        else:
            self.AEVT_index[key] = {}
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]

    def get(self, key):
        try:
            return self.AEVT_index[key]
        except Exception as e:
            raise e


class VAET:

    def __init__(self):
        self.VAET_index = {}

    def insert(self, datom):
        key = datom.value
        if key in self.VAET_index:
            self.VAET_index[key][datom.attribute].append([datom.entity,
                datom.tx])
        else:
            self.VAET_index[key] = {}
            self.VAET_index[key][datom.attribute] = []
            self.VAET_index[key][datom.attribute].append([datom.entity,
                datom.tx])

    def get(self, key):
        try:
            return self.VAET_index[key]
        except Exception as e:
            raise e


class AVET:
    pass


class LogIndex:

    def __init__(self):
        self.log_index = []

    def insert(self, datom):
        self.log_index.append(datom)

from abc import ABC, abstractmethod
from collections import namedtuple

Data = namedtuple('Data', ['entity', 'attribute', 'value'])
Datom = namedtuple('Datom', ['entity', 'attribute', 'value', 'tx'])


class BaseIndex(ABC):

    @abstractmethod
    def insert(self, datom):
        pass
    
    @abstractmethod
    def get(self, key):
        pass


class EAVT(BaseIndex):
    def __init__(self):
        self.EAVT_index = {}
    
    def insert(self, datom):
        key = datom.entity

        if key in self.EAVT_index:
            self.EAVT_index[key][datom.attribute] = [datom.value, datom.tx]
        else:
            self.EAVT_index[key] = {}
            self.EAVT_index[key][datom.attribute] = [datom.value, datom.tx]

    def get(self, key):
        try:
            return self.EAVT_index[key]
        except Exception as e:
            raise e


class AEVT:
    def __init__(self):
        self.AEVT_index = {}
    
    def insert(self, datom):
        key = datom.attribute

        if key in self.AEVT_index:
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]
        else:
            self.AEVT_index[key] = {}
            self.AEVT_index[key][datom.entity] = [datom.value, datom.tx]
   
    def get(self, key):
        try:
            return self.AEVT_index[key]
        except Exception as e:
            raise e


class VAET:
    def __init__(self):
        self.VAET_index = {}
    
    def insert(self, datom):
        key = datom.value

        if key in self.VAET_index:
            self.VAET_index[key][datom.attribute].append([datom.entity, datom.tx])
        else:
            self.VAET_index[key] = {}
            self.VAET_index[key][datom.attribute] = []
            self.VAET_index[key][datom.attribute].append([datom.entity, datom.tx])
    
    def get(self, key):
        try:
            return self.VAET_index[key]
        except Exception as e:
            raise e


class AVET:
    pass


class LogIndex:
    def __init__(self):
        self.log_index = []
    
    def insert(self, datom):
        self.log_index.append(datom)
