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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.s: E = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.q: I = None
        self.z: I = None
        self.o: B = None
        self.t: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: B = None
        self.u: D = None
        self.r: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.r: E = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: F = None
        self.r: C = None
        self.t: F = None
        self.v: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.u: F = None
        self.s: E = None
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.p: E = None
        self.q: I = None
        self.z: I = None
        self.o: B = None
        self.t: C = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: I = None
        self.p: B = None
        self.u: D = None
        self.r: A = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.o: F = None
        self.r: E = None
        self.s: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: H = None
        self.p: F = None
        self.r: C = None
        self.t: F = None
        self.v: D = None
        self.txt = txt

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

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