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

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.x: G = None
        self.q: H = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: G = None
        self.v: A = None
        self.s: I = None
        self.t: G = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: F = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

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

k.x = b
k.q = i
j.t = b
j.y = b
j.x = k
j.q = k
j.w = d
j.z = g
j.v = g
j.u = g
j.p = i
g.o = d
g.u = a
g.x = c
g.q = b
g.p = k
g.r = j
a.v = i
a.z = i
a.w = i
a.t = i
a.r = f
a.y = d
f.t = i
f.x = a
f.q = c
f.s = g
d.t = a
c.s = k
b.z = i
b.s = i
b.w = c
b.t = c
b.v = k
b.o = j
i.q = a
i.r = a
i.v = d
i.s = f
assert c.s.q.v.t.z.txt == "
class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.q: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: D = None
        self.x: G = None
        self.q: H = None
        self.p: A = None
        self.r: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: G = None
        self.v: A = None
        self.s: I = None
        self.t: G = None
        self.o: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.v: F = None
        self.s: E = None
        self.r: D = None
        self.txt = txt

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

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