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

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

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

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

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

e = A("e")
j = B("j")
k = C("k")
i = D("i")
a = E("a")
l = E("l")
f = B("f")
b = A("b")

e.x = i
j.x = i
j.p = i
j.o = f
k.u = e
i.s = l
a.u = f
a.z = k
a.t = k
a.v = k
l.u = j
l.z = k
l.t = k
l.v = k
f.x = i
f.p = i
f.o = j
b.x = i
assert k.u.x.s.u.o.txt == "
class A:
    def __init__(self, txt: str):
        self.x: D = None
        self.txt = txt

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

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

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

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

e = A("e")
j = B("j")
k = C("k")
i = D("i")
a = E("a")
l = E("l")
f = B("f")
b = A("b")

e.x = i
j.x = i
j.p = i
j.o = f
k.u = e
i.s = l
a.u = f
a.z = k
a.t = k
a.v = k
l.u = j
l.z = k
l.t = k
l.v = k
f.x = i
f.p = i
f.o = j
b.x = i
assert k.u.x.s.u.o.txt == "f"