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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: C = None
        self.txt = txt

i = A("i")
k = B("k")
e = C("e")
l = D("l")
d = E("d")
j = E("j")
h = D("h")
a = A("a")

i.y = l
i.v = l
i.t = h
k.v = h
k.z = e
e.w = d
e.o = a
e.s = j
l.v = a
d.z = j
d.u = e
j.z = d
j.u = e
h.v = a
a.y = h
a.t = h
a.v = h
assert e.w.u.w.txt == "
class A:
    def __init__(self, txt: str):
        self.y: D = None
        self.t: D = None
        self.v: D = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: E = None
        self.u: C = None
        self.txt = txt

i = A("i")
k = B("k")
e = C("e")
l = D("l")
d = E("d")
j = E("j")
h = D("h")
a = A("a")

i.y = l
i.v = l
i.t = h
k.v = h
k.z = e
e.w = d
e.o = a
e.s = j
l.v = a
d.z = j
d.u = e
j.z = d
j.u = e
h.v = a
a.y = h
a.t = h
a.v = h
assert e.w.u.w.txt == "d"