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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: H = None
        self.y: I = None
        self.q: F = None
        self.s: E = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: E = None
        self.p: H = None
        self.r: B = None
        self.x: G = None
        self.q: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: A = None
        self.r: C = None
        self.z: D = None
        self.t: I = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.u: D = None
        self.y: D = None
        self.s: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: H = None
        self.y: I = None
        self.q: F = None
        self.s: E = None
        self.z: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: E = None
        self.p: H = None
        self.r: B = None
        self.x: G = None
        self.q: H = None
        self.w: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: A = None
        self.r: C = None
        self.z: D = None
        self.t: I = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: C = None
        self.u: D = None
        self.y: D = None
        self.s: H = None
        self.txt = txt

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

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