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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: I = None
        self.p: F = None
        self.q: I = None
        self.t: I = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.r: E = None
        self.t: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: H = None
        self.w: I = None
        self.p: F = None
        self.q: I = None
        self.t: I = None
        self.v: F = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

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

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

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

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