class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: C = None
        self.y: H = None
        self.v: G = None
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.u: F = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

n = A("n")
j = B("j")
a = C("a")
l = D("l")
m = E("m")
e = F("e")
h = G("h")
i = H("i")
c = I("c")

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.w: C = None
        self.z: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: F = None
        self.z: C = None
        self.u: F = None
        self.q: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: A = None
        self.txt = txt

n = A("n")
j = B("j")
a = C("a")
l = D("l")
m = E("m")
e = F("e")
h = G("h")
i = H("i")
c = I("c")

n.o = j
n.x = a
n.y = i
n.v = h
n.s = h
j.x = a
j.z = n
j.s = h
j.w = h
j.y = i
j.t = c
a.w = m
a.s = m
a.x = l
a.v = h
a.r = c
a.u = c
a.t = e
a.z = n
l.r = c
l.t = c
l.z = c
l.u = h
l.w = j
m.t = j
m.s = a
e.p = i
e.x = m
e.q = c
e.w = j
e.s = l
h.w = a
h.z = m
i.v = e
i.u = e
i.z = a
i.q = n
c.t = n
assert n.x.t.s.z.t.txt == "n"