class A:
    def __init__(self, txt: str):
        self.o: J = None
        self.z: E = None
        self.t: E = None
        self.w: F = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: D = None
        self.t: I = None
        self.u: F = None
        self.q: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.p: A = None
        self.u: C = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: J = None
        self.v: A = None
        self.o: C = None
        self.y: G = None
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: D = None
        self.t: I = None
        self.u: F = None
        self.q: E = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.z: E = None
        self.q: C = None
        self.p: A = None
        self.u: C = None
        self.x: I = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.q: J = None
        self.v: A = None
        self.o: C = None
        self.y: G = None
        self.u: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: I = None
        self.txt = txt

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

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