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

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: H = None
        self.p: H = None
        self.y: E = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: E = None
        self.v: D = None
        self.y: H = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: F = None
        self.s: E = None
        self.txt = txt

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

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

a.o = f
a.s = f
a.r = d
a.x = d
a.q = b
a.y = c
a.w = k
a.v = e
k.z = m
k.q = m
k.u = c
m.y = k
m.w = e
e.r = m
e.z = m
e.v = c
e.p = c
e.y = d
d.s = b
d.r = e
d.z = m
d.v = g
g.t = k
g.z = d
g.v = e
g.y = c
g.o = c
b.u = m
b.q = m
b.w = e
b.x = e
b.t = k
b.y = k
b.r = g
b.o = g
b.z = a
c.q = a
c.p = g
c.s = d
j.s = f
j.p = f
j.y = f
j.u = m
j.z = a
j.w = k
j.x = b
f.s = j
f.p = j
f.y = j
f.u = m
f.z = a
f.w = k
f.x = b
assert b.z.v.z.w.v.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: I = None
        self.s: I = None
        self.r: E = None
        self.q: G = None
        self.x: E = None
        self.y: H = None
        self.w: B = None
        self.v: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: C = None
        self.q: C = None
        self.u: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: C = None
        self.v: H = None
        self.p: H = None
        self.y: E = None
        self.z: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.z: E = None
        self.v: D = None
        self.y: H = None
        self.o: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.q: A = None
        self.p: F = None
        self.s: E = None
        self.txt = txt

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

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

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