class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.v: F = None
        self.p: G = None
        self.u: F = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.y: C = None
        self.z: C = None
        self.u: D = None
        self.v: D = None
        self.x: D = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.o: A = None
        self.q: B = None
        self.y: C = None
        self.z: C = None
        self.u: D = None
        self.v: D = None
        self.x: D = None
        self.r: G = None
        self.txt = txt

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

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

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

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

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