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

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: B = None
        self.t: B = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: A = None
        self.x: G = None
        self.u: H = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

m.z = h
j.s = c
l.x = m
l.y = k
a.s = f
a.t = j
a.u = l
h.z = k
h.u = i
f.p = e
f.x = e
f.w = j
f.t = j
f.r = l
e.y = k
e.u = k
e.s = k
e.z = m
e.x = i
e.t = a
k.w = h
i.y = k
i.u = k
i.s = k
i.z = m
i.x = c
i.t = a
c.y = k
c.u = k
c.s = k
c.z = m
c.x = i
c.t = a
assert h.z.w.u.t.s.x.x.x.z.z.txt == "
class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: A = None
        self.y: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.w: B = None
        self.t: B = None
        self.x: G = None
        self.r: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: A = None
        self.x: G = None
        self.u: H = None
        self.s: H = None
        self.t: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: E = None
        self.txt = txt

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

m.z = h
j.s = c
l.x = m
l.y = k
a.s = f
a.t = j
a.u = l
h.z = k
h.u = i
f.p = e
f.x = e
f.w = j
f.t = j
f.r = l
e.y = k
e.u = k
e.s = k
e.z = m
e.x = i
e.t = a
k.w = h
i.y = k
i.u = k
i.s = k
i.z = m
i.x = c
i.t = a
c.y = k
c.u = k
c.s = k
c.z = m
c.x = i
c.t = a
assert h.z.w.u.t.s.x.x.x.z.z.txt == "h"