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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: H = None
        self.u: A = None
        self.t: G = None
        self.w: E = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: I = None
        self.r: G = None
        self.w: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.s: D = None
        self.z: G = None
        self.v: C = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: G = None
        self.x: H = None
        self.u: A = None
        self.t: G = None
        self.w: E = None
        self.q: C = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.q: I = None
        self.r: G = None
        self.w: I = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: D = None
        self.s: D = None
        self.v: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.s: D = None
        self.z: G = None
        self.v: C = None
        self.r: A = None
        self.o: A = None
        self.txt = txt

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

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