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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: G = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.x: F = None
        self.q: G = None
        self.txt = txt

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

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