class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: C = None
        self.x: B = None
        self.r: C = None
        self.q: E = None
        self.u: C = None
        self.z: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.o: C = None
        self.u: A = None
        self.r: B = None
        self.q: B = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.x: F = None
        self.p: B = None
        self.o: C = None
        self.y: D = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: D = None
        self.w: G = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: F = None
        self.s: E = None
        self.o: F = None
        self.r: E = None
        self.y: B = None
        self.txt = txt

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

m = A("m")
d = B("d")
a = C("a")
e = D("e")
l = E("l")
i = F("i")
c = G("c")
b = H("b")

m.w = d
m.x = d
m.p = a
m.r = a
m.u = a
m.q = l
m.z = e
d.w = a
a.p = m
a.s = d
e.x = d
e.t = d
e.r = d
e.q = d
e.o = a
e.u = m
e.w = l
l.z = i
l.x = i
l.s = e
l.y = e
l.p = d
l.o = a
l.u = m
i.y = m
i.q = e
i.w = c
i.s = c
c.u = e
c.w = i
c.o = i
c.s = l
c.r = l
c.y = d
b.v = a
b.o = c
b.w = e
assert e.o.p.r.s.w.s.w.p.txt == "
class A:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: C = None
        self.x: B = None
        self.r: C = None
        self.q: E = None
        self.u: C = None
        self.z: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: B = None
        self.o: C = None
        self.u: A = None
        self.r: B = None
        self.q: B = None
        self.w: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: F = None
        self.s: D = None
        self.x: F = None
        self.p: B = None
        self.o: C = None
        self.y: D = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: D = None
        self.w: G = None
        self.s: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.w: F = None
        self.s: E = None
        self.o: F = None
        self.r: E = None
        self.y: B = None
        self.txt = txt

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

m = A("m")
d = B("d")
a = C("a")
e = D("e")
l = E("l")
i = F("i")
c = G("c")
b = H("b")

m.w = d
m.x = d
m.p = a
m.r = a
m.u = a
m.q = l
m.z = e
d.w = a
a.p = m
a.s = d
e.x = d
e.t = d
e.r = d
e.q = d
e.o = a
e.u = m
e.w = l
l.z = i
l.x = i
l.s = e
l.y = e
l.p = d
l.o = a
l.u = m
i.y = m
i.q = e
i.w = c
i.s = c
c.u = e
c.w = i
c.o = i
c.s = l
c.r = l
c.y = d
b.v = a
b.o = c
b.w = e
assert e.o.p.r.s.w.s.w.p.txt == "m"