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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: F = None
        self.u: B = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.p: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: F = None
        self.u: B = None
        self.t: F = None
        self.txt = txt

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

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

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

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

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

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