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

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: H = None
        self.v: H = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.s: F = None
        self.o: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: D = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: E = None
        self.w: H = None
        self.t: F = None
        self.txt = txt

m = A("m")
k = B("k")
n = C("n")
f = D("f")
d = E("d")
b = F("b")
i = G("i")
g = H("g")
h = I("h")

m.z = i
m.u = i
m.t = d
m.s = b
m.q = b
m.x = k
k.s = g
n.w = k
n.s = i
n.u = d
f.w = b
f.x = g
f.v = g
f.r = d
d.y = b
d.s = b
d.o = b
d.r = i
b.z = n
b.w = f
i.t = b
i.x = h
i.p = k
i.o = k
i.q = n
i.u = m
i.z = m
g.o = h
g.q = f
g.u = m
g.p = n
h.r = g
h.w = g
h.v = d
h.t = b
assert m.s.w.x.o.v.txt == "
class A:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: G = None
        self.t: E = None
        self.s: F = None
        self.x: B = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: G = None
        self.u: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: H = None
        self.v: H = None
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: F = None
        self.r: G = None
        self.s: F = None
        self.o: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.q: D = None
        self.u: A = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: E = None
        self.w: H = None
        self.t: F = None
        self.txt = txt

m = A("m")
k = B("k")
n = C("n")
f = D("f")
d = E("d")
b = F("b")
i = G("i")
g = H("g")
h = I("h")

m.z = i
m.u = i
m.t = d
m.s = b
m.q = b
m.x = k
k.s = g
n.w = k
n.s = i
n.u = d
f.w = b
f.x = g
f.v = g
f.r = d
d.y = b
d.s = b
d.o = b
d.r = i
b.z = n
b.w = f
i.t = b
i.x = h
i.p = k
i.o = k
i.q = n
i.u = m
i.z = m
g.o = h
g.q = f
g.u = m
g.p = n
h.r = g
h.w = g
h.v = d
h.t = b
assert m.s.w.x.o.v.txt == "d"