class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.z: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

l.u = j
l.p = c
l.z = k
l.x = k
b.s = k
b.o = k
c.s = i
c.t = k
k.q = i
k.s = c
j.t = l
i.s = c
i.t = k
assert j.t.p.t.q.s.t.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: C = None
        self.z: D = None
        self.x: D = None
        self.txt = txt

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

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

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

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

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

l.u = j
l.p = c
l.z = k
l.x = k
b.s = k
b.o = k
c.s = i
c.t = k
k.q = i
k.s = c
j.t = l
i.s = c
i.t = k
assert j.t.p.t.q.s.t.txt == "k"