class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.z: D = None
        self.q: G = None
        self.y: G = None
        self.u: I = None
        self.p: D = None
        self.s: E = None
        self.v: E = None
        self.o: I = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.s: A = None
        self.y: G = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: C = None
        self.s: I = None
        self.r: B = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: A = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: E = None
        self.u: C = None
        self.p: B = None
        self.q: B = None
        self.r: F = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: F = None
        self.p: C = None
        self.s: A = None
        self.y: G = None
        self.q: G = None
        self.v: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: B = None
        self.t: C = None
        self.s: I = None
        self.r: B = None
        self.x: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: A = None
        self.q: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.z: E = None
        self.u: C = None
        self.p: B = None
        self.q: B = None
        self.r: F = None
        self.v: B = None
        self.t: D = None
        self.txt = txt

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

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

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