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

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

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

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

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

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

h.x = c
h.o = c
h.z = d
h.w = d
g.w = j
g.v = a
l.z = d
l.y = a
l.o = g
i.y = k
d.o = i
d.v = g
d.z = l
m.y = k
j.y = d
k.o = i
k.v = g
k.z = l
a.w = i
a.v = g
c.x = h
c.o = h
c.z = k
c.w = k
assert a.w.y.z.o.w.y.txt == "
class A:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: A = None
        self.z: E = None
        self.w: E = None
        self.txt = txt

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

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

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

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

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

h.x = c
h.o = c
h.z = d
h.w = d
g.w = j
g.v = a
l.z = d
l.y = a
l.o = g
i.y = k
d.o = i
d.v = g
d.z = l
m.y = k
j.y = d
k.o = i
k.v = g
k.z = l
a.w = i
a.v = g
c.x = h
c.o = h
c.z = k
c.w = k
assert a.w.y.z.o.w.y.txt == "d"