class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: E = None
        self.w: H = None
        self.u: B = None
        self.p: A = None
        self.y: I = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.u: D = None
        self.o: A = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.y: J = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: G = None
        self.r: G = None
        self.x: H = None
        self.o: F = None
        self.z: H = None
        self.y: G = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.s: F = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: E = None
        self.w: H = None
        self.u: B = None
        self.p: A = None
        self.y: I = None
        self.t: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.p: G = None
        self.q: D = None
        self.u: D = None
        self.o: A = None
        self.t: D = None
        self.y: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.u: B = None
        self.y: J = None
        self.z: C = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: G = None
        self.r: G = None
        self.x: H = None
        self.o: F = None
        self.z: H = None
        self.y: G = None
        self.u: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: B = None
        self.x: F = None
        self.s: F = None
        self.t: B = None
        self.q: C = None
        self.txt = txt

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

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