class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: E = None
        self.v: H = None
        self.q: G = None
        self.t: C = None
        self.r: C = None
        self.o: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: D = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.t: A = None
        self.x: I = None
        self.s: A = None
        self.u: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: G = None
        self.q: E = None
        self.o: H = None
        self.z: F = None
        self.p: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: D = None
        self.p: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.u: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: A = None
        self.t: A = None
        self.x: I = None
        self.s: A = None
        self.u: C = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: G = None
        self.q: E = None
        self.o: H = None
        self.z: F = None
        self.p: A = None
        self.txt = txt

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

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