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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: E = None
        self.q: G = None
        self.r: D = None
        self.x: I = None
        self.w: D = None
        self.v: D = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.v: H = None
        self.w: G = None
        self.o: G = None
        self.y: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: E = None
        self.q: G = None
        self.r: D = None
        self.x: I = None
        self.w: D = None
        self.v: D = None
        self.s: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: E = None
        self.p: H = None
        self.v: H = None
        self.w: G = None
        self.o: G = None
        self.y: F = None
        self.txt = txt

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

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