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

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.o: D = None
        self.x: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

j = A("j")
g = B("g")
m = C("m")
k = D("k")
e = E("e")
a = B("a")
b = C("b")
n = A("n")
d = A("d")

j.w = g
j.o = a
j.z = k
g.s = j
g.r = b
g.v = b
g.o = k
g.x = k
m.r = n
k.q = a
e.x = k
e.q = m
a.s = d
a.r = b
a.v = b
a.o = k
a.x = k
b.r = n
n.w = g
n.o = a
n.z = k
d.w = g
d.o = g
d.z = k
assert e.x.q.o.q.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.o: B = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: C = None
        self.o: D = None
        self.x: D = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

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

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

j = A("j")
g = B("g")
m = C("m")
k = D("k")
e = E("e")
a = B("a")
b = C("b")
n = A("n")
d = A("d")

j.w = g
j.o = a
j.z = k
g.s = j
g.r = b
g.v = b
g.o = k
g.x = k
m.r = n
k.q = a
e.x = k
e.q = m
a.s = d
a.r = b
a.v = b
a.o = k
a.x = k
b.r = n
n.w = g
n.o = a
n.z = k
d.w = g
d.o = g
d.z = k
assert e.x.q.o.q.txt == "a"