class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.p: G = None
        self.q: F = None
        self.o: F = None
        self.r: G = None
        self.w: G = None
        self.t: G = None
        self.y: I = None
        self.s: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: H = None
        self.z: J = None
        self.u: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: F = None
        self.v: J = None
        self.x: H = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: C = None
        self.v: F = None
        self.p: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.p: A = None
        self.v: J = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.o: E = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: I = None
        self.w: H = None
        self.z: J = None
        self.u: H = None
        self.y: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: F = None
        self.v: J = None
        self.x: H = None
        self.z: D = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.s: C = None
        self.v: F = None
        self.p: C = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.s: C = None
        self.p: A = None
        self.v: J = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: C = None
        self.o: E = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.z: B = None
        self.txt = txt

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

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