class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.r: B = None
        self.o: G = None
        self.q: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.p: F = None
        self.w: H = None
        self.o: E = None
        self.v: E = None
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: B = None
        self.q: C = None
        self.v: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.s: I = None
        self.y: I = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: E = None
        self.p: F = None
        self.w: H = None
        self.o: E = None
        self.v: E = None
        self.x: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.w: H = None
        self.x: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: B = None
        self.q: C = None
        self.v: I = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.p: D = None
        self.s: I = None
        self.y: I = None
        self.t: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: E = None
        self.txt = txt

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

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