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

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

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

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

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

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

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

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

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

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

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

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

a.s = f
a.t = f
a.o = k
a.x = k
a.v = b
c.q = k
c.x = f
e.v = k
f.z = a
f.t = b
k.u = f
k.v = f
b.q = k
b.x = f
assert a.o.u.z.v.txt == "b"