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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: E = None
        self.p: E = None
        self.v: E = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: I = None
        self.q: D = None
        self.o: E = None
        self.u: C = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: F = None
        self.s: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.r: D = None
        self.u: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: I = None
        self.z: E = None
        self.p: E = None
        self.v: E = None
        self.u: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.x: B = None
        self.t: I = None
        self.q: D = None
        self.o: E = None
        self.u: C = None
        self.s: A = None
        self.p: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.u: G = None
        self.w: F = None
        self.txt = txt

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

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