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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: A = None
        self.x: E = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.y: C = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

i = A("i")
e = B("e")
d = C("d")
f = D("f")
l = E("l")
j = C("j")
b = D("b")
m = E("m")

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

class B:
    def __init__(self, txt: str):
        self.q: E = None
        self.y: A = None
        self.x: E = None
        self.t: D = None
        self.p: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.z: A = None
        self.y: C = None
        self.x: A = None
        self.w: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

i = A("i")
e = B("e")
d = C("d")
f = D("f")
l = E("l")
j = C("j")
b = D("b")
m = E("m")

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