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

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.r: B = None
        self.o: B = None
        self.txt = txt

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

e = A("e")
n = B("n")
c = C("c")
k = D("k")
j = A("j")
i = D("i")
f = C("f")
d = B("d")
a = B("a")

e.s = a
n.u = e
n.z = k
c.z = a
c.v = n
c.r = n
c.o = d
k.v = n
k.z = c
j.s = n
i.v = d
i.z = f
f.z = d
f.o = d
f.v = n
f.r = a
d.u = e
d.z = i
a.u = e
a.z = k
assert k.z.r.u.s.z.v.z.z.v.txt == "
class A:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: B = None
        self.r: B = None
        self.o: B = None
        self.txt = txt

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

e = A("e")
n = B("n")
c = C("c")
k = D("k")
j = A("j")
i = D("i")
f = C("f")
d = B("d")
a = B("a")

e.s = a
n.u = e
n.z = k
c.z = a
c.v = n
c.r = n
c.o = d
k.v = n
k.z = c
j.s = n
i.v = d
i.z = f
f.z = d
f.o = d
f.v = n
f.r = a
d.u = e
d.z = i
a.u = e
a.z = k
assert k.z.r.u.s.z.v.z.z.v.txt == "n"