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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: F = None
        self.p: G = None
        self.v: E = None
        self.z: C = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: G = None
        self.r: H = None
        self.u: B = None
        self.y: C = None
        self.w: A = None
        self.z: H = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: A = None
        self.w: F = None
        self.p: G = None
        self.v: E = None
        self.z: C = None
        self.x: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.o: D = None
        self.s: G = None
        self.r: H = None
        self.u: B = None
        self.y: C = None
        self.w: A = None
        self.z: H = None
        self.p: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: A = None
        self.txt = txt

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

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

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