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

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

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

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

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

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

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

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

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

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

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

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

n.z = d
n.w = d
n.t = k
n.u = k
d.s = k
d.u = k
d.v = l
d.r = n
d.q = b
k.p = b
k.y = b
l.o = c
b.p = k
b.q = d
c.z = d
c.w = d
c.t = k
c.u = k
assert c.t.p.q.txt == "d"