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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: E = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: G = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: D = None
        self.r: H = None
        self.z: F = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.u: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.u: E = None
        self.q: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: I = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: A = None
        self.p: G = None
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.t: D = None
        self.r: H = None
        self.z: F = None
        self.p: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: E = None
        self.w: E = None
        self.u: C = None
        self.txt = txt

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

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