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

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

m = A("m")
e = B("e")
n = C("n")
b = D("b")
g = E("g")
i = C("i")
l = B("l")
k = E("k")

m.w = b
e.x = b
e.t = b
e.u = g
n.q = g
n.r = g
n.z = g
n.o = i
b.w = k
b.q = e
g.r = b
g.s = b
g.t = b
g.y = l
i.q = g
i.o = n
i.r = k
i.z = k
l.x = b
l.t = b
l.u = k
k.r = b
k.s = b
k.t = b
k.y = l
assert b.w.r.w.y.u.y.txt == "
class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.q: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: D = None
        self.s: D = None
        self.t: D = None
        self.y: B = None
        self.txt = txt

m = A("m")
e = B("e")
n = C("n")
b = D("b")
g = E("g")
i = C("i")
l = B("l")
k = E("k")

m.w = b
e.x = b
e.t = b
e.u = g
n.q = g
n.r = g
n.z = g
n.o = i
b.w = k
b.q = e
g.r = b
g.s = b
g.t = b
g.y = l
i.q = g
i.o = n
i.r = k
i.z = k
l.x = b
l.t = b
l.u = k
k.r = b
k.s = b
k.t = b
k.y = l
assert b.w.r.w.y.u.y.txt == "l"