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

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

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

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

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

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

a.w = n
a.r = m
a.t = i
a.p = i
a.q = l
i.s = a
i.w = g
i.z = g
g.v = f
h.z = g
h.s = i
h.y = f
h.v = a
m.o = a
m.t = n
m.z = l
m.w = c
m.v = i
n.w = a
n.r = m
n.t = i
n.p = i
n.q = l
f.z = g
f.s = i
f.y = h
f.v = a
c.z = g
c.s = i
c.y = j
c.v = a
j.z = g
j.s = i
j.y = f
j.v = n
l.o = a
l.t = a
l.z = m
l.w = f
l.v = i
assert m.w.y.v.txt == "
class A:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: E = None
        self.t: B = None
        self.q: E = None
        self.p: B = None
        self.txt = txt

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

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

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

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

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

a.w = n
a.r = m
a.t = i
a.p = i
a.q = l
i.s = a
i.w = g
i.z = g
g.v = f
h.z = g
h.s = i
h.y = f
h.v = a
m.o = a
m.t = n
m.z = l
m.w = c
m.v = i
n.w = a
n.r = m
n.t = i
n.p = i
n.q = l
f.z = g
f.s = i
f.y = h
f.v = a
c.z = g
c.s = i
c.y = j
c.v = a
j.z = g
j.s = i
j.y = f
j.v = n
l.o = a
l.t = a
l.z = m
l.w = f
l.v = i
assert m.w.y.v.txt == "n"