class T:
    def __init__(self, n):
        self.n = n

    def with_dest_addr(self, x):
        mask = ((1 << (6 - 5 + 1)) - 1) << 5
        self.n = self.n ^ ((self.n ^ x) & mask)

    def with_src_addr(self, x):
        mask = ((1 << (8 - 7 + 1)) - 1) << 7
        self.n = self.n ^ ((self.n ^ x) & mask)
