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

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = 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.w: B = None
        self.z: A = None
        self.y: C = None
        self.o: B = None
        self.txt = txt

n = A("n")
j = B("j")
c = C("c")
f = D("f")
m = E("m")
h = C("h")
e = E("e")
k = A("k")
a = E("a")

n.u = f
n.z = j
n.s = k
n.v = k
j.t = f
c.s = j
c.t = a
f.s = m
m.w = j
m.o = j
m.z = k
m.y = h
h.s = j
h.t = a
e.w = j
e.o = j
e.z = k
e.y = h
k.u = f
k.z = j
k.s = n
k.v = n
a.w = j
a.o = j
a.z = k
a.y = h
assert k.u.s.z.z.t.s.y.s.txt == "
class A:
    def __init__(self, txt: str):
        self.u: D = None
        self.z: B = None
        self.s: A = None
        self.v: A = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: B = None
        self.t: E = 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.w: B = None
        self.z: A = None
        self.y: C = None
        self.o: B = None
        self.txt = txt

n = A("n")
j = B("j")
c = C("c")
f = D("f")
m = E("m")
h = C("h")
e = E("e")
k = A("k")
a = E("a")

n.u = f
n.z = j
n.s = k
n.v = k
j.t = f
c.s = j
c.t = a
f.s = m
m.w = j
m.o = j
m.z = k
m.y = h
h.s = j
h.t = a
e.w = j
e.o = j
e.z = k
e.y = h
k.u = f
k.z = j
k.s = n
k.v = n
a.w = j
a.o = j
a.z = k
a.y = h
assert k.u.s.z.z.t.s.y.s.txt == "j"