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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: H = None
        self.q: E = None
        self.o: I = None
        self.y: G = None
        self.r: A = None
        self.s: H = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.r: I = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.s: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: G = None
        self.p: H = None
        self.q: E = None
        self.o: I = None
        self.y: G = None
        self.r: A = None
        self.s: H = None
        self.u: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.o: C = None
        self.r: I = None
        self.u: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.v: F = None
        self.u: A = None
        self.s: C = None
        self.txt = txt

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

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