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

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

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

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

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

d = A("d")
j = B("j")
n = C("n")
i = D("i")
a = E("a")
b = C("b")
h = B("h")
l = B("l")
g = A("g")

d.t = i
d.y = i
d.x = h
j.v = n
j.y = g
j.t = h
j.z = i
n.o = i
n.q = b
i.u = a
i.z = a
i.s = a
i.w = j
a.o = i
a.s = n
b.o = i
b.q = n
h.v = n
h.y = d
h.t = l
h.z = i
l.v = b
l.y = g
l.t = h
l.z = i
g.t = i
g.y = i
g.x = h
assert h.z.w.z.txt == "
class A:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: B = None
        self.y: D = None
        self.txt = txt

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

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

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

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

d = A("d")
j = B("j")
n = C("n")
i = D("i")
a = E("a")
b = C("b")
h = B("h")
l = B("l")
g = A("g")

d.t = i
d.y = i
d.x = h
j.v = n
j.y = g
j.t = h
j.z = i
n.o = i
n.q = b
i.u = a
i.z = a
i.s = a
i.w = j
a.o = i
a.s = n
b.o = i
b.q = n
h.v = n
h.y = d
h.t = l
h.z = i
l.v = b
l.y = g
l.t = h
l.z = i
g.t = i
g.y = i
g.x = h
assert h.z.w.z.txt == "i"