class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: C = None
        self.t: C = None
        self.u: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: E = None
        self.q: E = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.x: C = None
        self.z: E = None
        self.t: F = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.x: H = None
        self.y: A = None
        self.p: C = None
        self.v: I = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: A = None
        self.w: C = None
        self.s: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.v: E = None
        self.q: E = None
        self.r: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.s: D = None
        self.p: E = None
        self.x: C = None
        self.z: E = None
        self.t: F = None
        self.y: A = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.u: C = None
        self.x: H = None
        self.y: A = None
        self.p: C = None
        self.v: I = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: H = None
        self.v: A = None
        self.w: C = None
        self.s: I = None
        self.txt = txt

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

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

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

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