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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: H = None
        self.y: F = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: H = None
        self.t: F = None
        self.r: B = None
        self.u: H = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.s: C = None
        self.w: H = None
        self.r: A = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: H = None
        self.y: F = None
        self.v: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.z: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: E = None
        self.o: H = None
        self.t: F = None
        self.r: B = None
        self.u: H = None
        self.x: A = None
        self.s: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.x: C = None
        self.s: C = None
        self.w: H = None
        self.r: A = None
        self.z: H = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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