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

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

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

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

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

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

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

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

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

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

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

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

l.x = k
l.y = k
l.t = b
l.q = f
f.o = b
f.v = k
c.w = b
b.s = l
b.w = c
b.r = k
b.z = f
k.t = l
k.u = l
k.y = c
k.w = f
k.v = f
assert c.w.r.t.q.o.txt == "b"