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

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

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

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

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

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

k.s = h
k.z = h
k.u = m
j.q = h
j.u = h
h.v = m
h.t = b
m.v = k
b.s = i
b.t = j
n.s = h
n.z = h
n.u = i
l.q = h
l.u = h
i.v = k
e.s = h
e.z = h
e.u = i
assert l.u.t.s.v.u.v.u.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: C = None
        self.z: C = None
        self.u: D = None
        self.txt = txt

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

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

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

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

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

k.s = h
k.z = h
k.u = m
j.q = h
j.u = h
h.v = m
h.t = b
m.v = k
b.s = i
b.t = j
n.s = h
n.z = h
n.u = i
l.q = h
l.u = h
i.v = k
e.s = h
e.z = h
e.u = i
assert l.u.t.s.v.u.v.u.v.txt == "k"