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

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

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

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

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

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

k.u = f
k.z = b
h.p = e
h.t = n
n.s = i
e.u = h
e.x = i
e.p = f
b.p = l
b.u = e
b.q = j
i.s = j
f.p = l
f.u = e
f.q = j
j.s = n
l.u = h
l.x = n
l.p = b
assert e.u.t.s.s.s.s.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

k.u = f
k.z = b
h.p = e
h.t = n
n.s = i
e.u = h
e.x = i
e.p = f
b.p = l
b.u = e
b.q = j
i.s = j
f.p = l
f.u = e
f.q = j
j.s = n
l.u = h
l.x = n
l.p = b
assert e.u.t.s.s.s.s.s.txt == "j"