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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: F = None
        self.y: D = None
        self.q: G = None
        self.t: F = None
        self.z: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.y: A = None
        self.s: B = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.w: B = None
        self.y: E = None
        self.z: A = None
        self.q: F = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.u: F = None
        self.y: D = None
        self.q: G = None
        self.t: F = None
        self.z: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.y: A = None
        self.s: B = None
        self.v: D = None
        self.w: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.p: E = None
        self.w: B = None
        self.y: E = None
        self.z: A = None
        self.q: F = None
        self.txt = txt

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

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