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

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: C = None
        self.w: B = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: D = None
        self.v: C = None
        self.o: A = None
        self.txt = txt

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

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

m.z = h
m.o = h
m.q = l
f.t = g
f.w = k
f.p = i
f.v = h
g.r = l
g.o = h
g.w = f
g.p = i
i.r = j
i.u = l
i.v = g
i.o = m
c.t = j
c.w = m
c.u = m
c.x = m
c.y = f
b.z = g
b.o = g
b.q = l
k.t = f
k.y = f
k.w = m
k.u = m
k.x = m
h.r = i
h.o = g
h.w = f
h.p = l
l.r = f
l.u = i
l.v = g
l.o = m
j.t = h
j.w = k
j.p = i
j.v = g
assert f.w.t.w.x.o.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: D = None
        self.o: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: D = None
        self.o: C = None
        self.w: B = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: D = None
        self.v: C = None
        self.o: A = None
        self.txt = txt

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

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

m.z = h
m.o = h
m.q = l
f.t = g
f.w = k
f.p = i
f.v = h
g.r = l
g.o = h
g.w = f
g.p = i
i.r = j
i.u = l
i.v = g
i.o = m
c.t = j
c.w = m
c.u = m
c.x = m
c.y = f
b.z = g
b.o = g
b.q = l
k.t = f
k.y = f
k.w = m
k.u = m
k.x = m
h.r = i
h.o = g
h.w = f
h.p = l
l.r = f
l.u = i
l.v = g
l.o = m
j.t = h
j.w = k
j.p = i
j.v = g
assert f.w.t.w.x.o.w.p.txt == "i"