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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.y: A = None
        self.z: A = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: D = None
        self.r: H = None
        self.v: E = None
        self.q: B = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: E = None
        self.z: F = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.o: F = None
        self.y: A = None
        self.z: A = None
        self.v: G = None
        self.q: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: A = None
        self.u: D = None
        self.r: H = None
        self.v: E = None
        self.q: B = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: F = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.t: B = None
        self.y: E = None
        self.z: F = None
        self.v: D = None
        self.txt = txt

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

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