class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.s: E = None
        self.z: H = None
        self.x: C = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: H = None
        self.y: F = None
        self.x: D = None
        self.v: F = None
        self.u: G = None
        self.txt = txt

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.q: B = None
        self.z: E = None
        self.o: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.w: H = None
        self.y: F = None
        self.x: D = None
        self.v: F = None
        self.u: G = None
        self.txt = txt

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

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