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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: C = None
        self.z: D = None
        self.s: J = None
        self.t: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: A = None
        self.s: B = None
        self.u: I = None
        self.y: C = None
        self.w: A = None
        self.q: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: J = None
        self.t: B = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: I = None
        self.w: C = None
        self.z: D = None
        self.s: J = None
        self.t: F = None
        self.v: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: A = None
        self.s: B = None
        self.u: I = None
        self.y: C = None
        self.w: A = None
        self.q: B = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: J = None
        self.t: B = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.r: D = None
        self.txt = txt

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

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