class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.q: A = None
        self.p: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.w: A = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

e = A("e")
m = B("m")
b = C("b")
n = D("n")
l = E("l")
d = F("d")
i = A("i")

e.v = d
e.t = b
m.s = d
m.y = b
m.p = b
m.t = b
m.q = e
b.o = i
b.t = l
b.z = l
n.z = b
n.t = m
n.w = d
l.y = d
d.t = i
d.w = i
d.y = b
d.r = l
d.x = m
i.v = d
i.t = b
assert m.s.y.z.y.x.q.txt == "
class A:
    def __init__(self, txt: str):
        self.v: F = None
        self.t: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: C = None
        self.q: A = None
        self.p: C = None
        self.t: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: E = None
        self.z: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: C = None
        self.t: B = None
        self.w: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: C = None
        self.w: A = None
        self.r: E = None
        self.x: B = None
        self.txt = txt

e = A("e")
m = B("m")
b = C("b")
n = D("n")
l = E("l")
d = F("d")
i = A("i")

e.v = d
e.t = b
m.s = d
m.y = b
m.p = b
m.t = b
m.q = e
b.o = i
b.t = l
b.z = l
n.z = b
n.t = m
n.w = d
l.y = d
d.t = i
d.w = i
d.y = b
d.r = l
d.x = m
i.v = d
i.t = b
assert m.s.y.z.y.x.q.txt == "e"