class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: D = None
        self.v: D = None
        self.s: F = None
        self.q: E = None
        self.u: F = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: J = None
        self.t: E = None
        self.y: H = None
        self.x: A = None
        self.z: H = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: D = None
        self.y: D = None
        self.v: A = None
        self.r: B = None
        self.z: H = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: A = None
        self.s: A = None
        self.txt = txt

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

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

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

m = A("m")
n = B("n")
h = C("h")
e = D("e")
f = E("f")
g = F("g")
i = G("i")
l = H("l")
b = I("b")
c = J("c")

m.o = g
m.s = g
m.u = g
m.x = e
m.v = e
m.q = f
m.t = n
n.q = c
n.v = c
n.t = f
n.y = l
n.z = l
n.x = m
n.s = b
h.x = f
h.y = f
h.t = l
h.v = i
h.u = i
h.p = e
h.o = e
h.s = n
h.w = b
h.q = g
e.r = f
f.t = i
f.s = e
f.y = e
f.v = m
f.r = n
f.z = l
f.o = h
g.x = n
g.v = n
g.w = e
g.z = e
i.z = g
i.o = m
i.s = m
l.z = b
l.y = b
l.r = g
l.t = h
l.w = m
b.w = g
b.z = l
b.p = e
c.w = f
c.y = f
c.v = f
c.s = f
c.u = e
c.o = i
c.q = b
assert n.x.t.t.y.r.v.q.z.txt == "
class A:
    def __init__(self, txt: str):
        self.o: F = None
        self.x: D = None
        self.v: D = None
        self.s: F = None
        self.q: E = None
        self.u: F = None
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: J = None
        self.v: J = None
        self.t: E = None
        self.y: H = None
        self.x: A = None
        self.z: H = None
        self.s: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: D = None
        self.y: D = None
        self.v: A = None
        self.r: B = None
        self.z: H = None
        self.o: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.z: F = None
        self.o: A = None
        self.s: A = None
        self.txt = txt

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

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

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

m = A("m")
n = B("n")
h = C("h")
e = D("e")
f = E("f")
g = F("g")
i = G("i")
l = H("l")
b = I("b")
c = J("c")

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