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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.p: H = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: I = None
        self.u: A = None
        self.o: B = None
        self.y: A = None
        self.s: A = None
        self.v: B = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: F = None
        self.v: I = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.v: D = None
        self.u: A = None
        self.p: B = None
        self.s: H = None
        self.x: H = None
        self.z: H = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: F = None
        self.x: B = None
        self.u: F = None
        self.t: G = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.txt = txt

g = A("g")
n = B("n")
c = C("c")
d = D("d")
e = E("e")
m = F("m")
i = G("i")
h = H("h")
l = I("l")

g.w = e
g.o = e
g.v = h
g.s = l
n.q = g
n.o = d
n.p = h
n.v = e
c.z = n
c.o = n
c.v = n
c.q = l
c.u = g
c.y = g
c.s = g
c.w = m
d.x = i
d.y = i
d.q = m
d.v = l
e.o = l
m.x = g
i.y = h
i.s = h
i.x = h
i.z = h
i.w = l
i.r = l
i.v = d
i.u = g
i.p = n
h.v = c
h.q = m
h.u = m
h.s = m
h.x = n
h.t = i
l.p = e
l.w = g
assert m.x.s.w.s.w.v.x.txt == "
class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.v: H = None
        self.s: I = None
        self.o: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.o: D = None
        self.p: H = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.q: I = None
        self.u: A = None
        self.o: B = None
        self.y: A = None
        self.s: A = None
        self.v: B = None
        self.w: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: F = None
        self.v: I = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.x: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.w: I = None
        self.v: D = None
        self.u: A = None
        self.p: B = None
        self.s: H = None
        self.x: H = None
        self.z: H = None
        self.r: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.q: F = None
        self.x: B = None
        self.u: F = None
        self.t: G = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: E = None
        self.w: A = None
        self.txt = txt

g = A("g")
n = B("n")
c = C("c")
d = D("d")
e = E("e")
m = F("m")
i = G("i")
h = H("h")
l = I("l")

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