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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: G = None
        self.w: A = None
        self.u: F = None
        self.t: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: I = None
        self.p: H = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: G = None
        self.w: D = None
        self.o: B = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: G = None
        self.w: A = None
        self.u: F = None
        self.t: B = None
        self.z: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.q: I = None
        self.p: H = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.x: G = None
        self.w: D = None
        self.o: B = None
        self.txt = txt

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

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