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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: H = None
        self.txt = txt

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

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

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

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

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

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