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

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

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

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

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

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

k.v = h
k.p = c
k.o = b
k.u = l
l.y = k
h.p = b
h.x = b
h.w = b
h.z = l
c.w = k
c.s = k
c.u = k
c.q = b
b.z = k
assert k.p.q.z.o.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: D = None
        self.o: E = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

k.v = h
k.p = c
k.o = b
k.u = l
l.y = k
h.p = b
h.x = b
h.w = b
h.z = l
c.w = k
c.s = k
c.u = k
c.q = b
b.z = k
assert k.p.q.z.o.z.txt == "k"