class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: G = None
        self.y: G = None
        self.x: B = None
        self.o: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: I = None
        self.x: D = None
        self.q: D = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: C = None
        self.w: C = None
        self.q: E = None
        self.u: H = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: G = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: C = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.s: D = None
        self.o: B = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: G = None
        self.p: I = None
        self.x: D = None
        self.q: D = None
        self.y: E = None
        self.o: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.y: C = None
        self.w: C = None
        self.q: E = None
        self.u: H = None
        self.v: G = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: B = None
        self.z: G = None
        self.t: A = None
        self.o: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: C = None
        self.q: H = None
        self.p: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.u: F = None
        self.s: D = None
        self.o: B = None
        self.txt = txt

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

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

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