class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.w: E = None
        self.v: H = None
        self.z: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: C = None
        self.w: C = None
        self.s: D = None
        self.y: J = None
        self.v: C = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: H = None
        self.y: D = None
        self.t: A = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: H = None
        self.q: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.t: C = None
        self.w: C = None
        self.s: D = None
        self.y: J = None
        self.v: C = None
        self.u: D = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.r: H = None
        self.v: H = None
        self.y: D = None
        self.t: A = None
        self.u: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.w: H = None
        self.q: H = None
        self.txt = txt

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

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