class A:
    def __init__(self, txt: str):
        self.y: B = None
        self.w: H = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: B = None
        self.t: F = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: I = None
        self.o: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: I = None
        self.w: B = None
        self.t: F = None
        self.s: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: H = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.s: I = None
        self.q: I = None
        self.o: F = None
        self.txt = txt

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

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

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