class A:
    def __init__(self, txt: str):
        self.w: I = None
        self.z: G = None
        self.v: C = None
        self.r: H = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: H = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.o: I = None
        self.u: B = None
        self.v: I = None
        self.x: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.r: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: F = None
        self.v: H = None
        self.q: G = None
        self.r: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.t: F = None
        self.y: D = None
        self.o: I = None
        self.u: B = None
        self.v: I = None
        self.x: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.p: F = None
        self.r: A = None
        self.txt = txt

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

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