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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: A = None
        self.s: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.t: C = None
        self.p: F = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.w: I = None
        self.x: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: H = None
        self.y: A = None
        self.s: G = None
        self.p: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: D = None
        self.p: E = None
        self.v: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: F = None
        self.t: C = None
        self.p: F = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: G = None
        self.u: C = None
        self.w: I = None
        self.x: I = None
        self.txt = txt

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

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

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