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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: D = None
        self.p: D = None
        self.x: A = None
        self.y: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.p: C = None
        self.r: C = None
        self.y: C = None
        self.z: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: D = None
        self.p: D = None
        self.x: A = None
        self.y: E = None
        self.txt = txt

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

e.x = h
e.r = f
e.t = l
e.z = l
j.o = n
j.y = a
h.y = m
h.v = f
h.z = l
l.p = h
l.r = h
l.y = h
l.z = h
n.s = f
n.y = f
n.u = i
n.p = i
n.x = m
i.p = h
i.r = h
i.y = h
i.z = h
m.x = h
m.r = f
m.t = i
m.z = i
f.s = n
f.y = n
f.u = i
f.p = l
f.x = e
a.o = n
a.y = j
assert n.x.z.r.z.z.txt == "h"