class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: C = None
        self.u: F = None
        self.v: E = None
        self.o: H = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: H = None
        self.p: I = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: G = None
        self.z: C = None
        self.v: C = None
        self.q: I = None
        self.y: I = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: I = None
        self.s: C = None
        self.u: D = None
        self.q: I = None
        self.y: G = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.w: B = None
        self.u: B = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.z: F = None
        self.w: H = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: B = None
        self.y: H = None
        self.p: I = None
        self.x: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: B = None
        self.x: G = None
        self.z: C = None
        self.v: C = None
        self.q: I = None
        self.y: I = None
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.w: I = None
        self.s: C = None
        self.u: D = None
        self.q: I = None
        self.y: G = None
        self.z: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: A = None
        self.y: G = None
        self.w: B = None
        self.u: B = None
        self.t: G = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.u: D = None
        self.z: F = None
        self.w: H = None
        self.txt = txt

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

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