class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.p: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: B = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

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

b = A("b")
c = B("c")
l = C("l")
e = D("e")
n = E("n")
f = E("f")
d = B("d")
k = E("k")
m = B("m")

b.x = d
b.s = l
b.p = n
c.u = m
l.s = b
l.t = d
l.v = f
e.w = n
e.p = d
e.t = k
e.r = l
n.z = c
n.s = k
n.t = e
f.z = c
f.s = k
f.t = e
d.u = m
k.z = d
k.s = n
k.t = e
m.u = c
assert e.t.t.w.txt == "
class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.s: C = None
        self.p: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: B = None
        self.t: E = None
        self.r: C = None
        self.txt = txt

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

b = A("b")
c = B("c")
l = C("l")
e = D("e")
n = E("n")
f = E("f")
d = B("d")
k = E("k")
m = B("m")

b.x = d
b.s = l
b.p = n
c.u = m
l.s = b
l.t = d
l.v = f
e.w = n
e.p = d
e.t = k
e.r = l
n.z = c
n.s = k
n.t = e
f.z = c
f.s = k
f.t = e
d.u = m
k.z = d
k.s = n
k.t = e
m.u = c
assert e.t.t.w.txt == "n"