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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: G = None
        self.o: H = None
        self.q: C = None
        self.u: A = None
        self.r: A = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: F = None
        self.x: F = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.z: H = None
        self.v: G = None
        self.o: H = None
        self.q: C = None
        self.u: A = None
        self.r: A = None
        self.w: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: A = None
        self.u: F = None
        self.x: F = None
        self.txt = txt

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

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

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