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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.q: H = None
        self.t: D = None
        self.u: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.u: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

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