class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: H = None
        self.v: G = None
        self.y: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: I = None
        self.v: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.w: G = None
        self.v: G = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.q: G = None
        self.o: I = None
        self.t: D = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: E = None
        self.x: B = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: C = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: D = None
        self.z: F = None
        self.x: B = None
        self.s: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.o: B = None
        self.y: I = None
        self.v: B = None
        self.x: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.t: B = None
        self.w: G = None
        self.v: G = None
        self.x: F = None
        self.z: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.o: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: A = None
        self.p: D = None
        self.q: G = None
        self.o: I = None
        self.t: D = None
        self.y: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: I = None
        self.w: E = None
        self.x: B = None
        self.v: D = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: E = None
        self.q: C = None
        self.o: B = None
        self.p: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: B = None
        self.t: D = None
        self.z: F = None
        self.x: B = None
        self.s: G = None
        self.txt = txt

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

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