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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: A = None
        self.txt = txt

l = A("l")
a = B("a")
k = C("k")
m = D("m")
n = E("n")
h = A("h")

l.z = n
l.p = n
l.s = m
l.t = k
a.y = h
a.o = h
a.z = n
k.o = a
k.z = m
m.v = n
n.p = a
n.r = h
h.z = n
h.p = n
h.s = m
h.t = k
assert h.s.v.p.z.p.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.s: D = None
        self.t: C = None
        self.p: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: B = None
        self.r: A = None
        self.txt = txt

l = A("l")
a = B("a")
k = C("k")
m = D("m")
n = E("n")
h = A("h")

l.z = n
l.p = n
l.s = m
l.t = k
a.y = h
a.o = h
a.z = n
k.o = a
k.z = m
m.v = n
n.p = a
n.r = h
h.z = n
h.p = n
h.s = m
h.t = k
assert h.s.v.p.z.p.z.txt == "n"