class A:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: C = None
        self.s: E = None
        self.w: B = None
        self.q: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.r: J = None
        self.v: J = None
        self.w: I = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: J = None
        self.s: C = None
        self.q: E = None
        self.x: E = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: E = None
        self.z: G = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: B = None
        self.r: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: H = None
        self.q: B = None
        self.t: I = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: D = None
        self.o: A = None
        self.r: J = None
        self.v: J = None
        self.w: I = None
        self.y: J = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.t: J = None
        self.s: C = None
        self.q: E = None
        self.x: E = None
        self.r: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.o: I = None
        self.x: E = None
        self.z: G = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: J = None
        self.z: B = None
        self.r: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: H = None
        self.q: B = None
        self.t: I = None
        self.txt = txt

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

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