class A:
    def __init__(self, txt: str):
        self.x: I = None
        self.v: D = None
        self.r: B = None
        self.z: B = None
        self.w: B = None
        self.s: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: J = None
        self.v: C = None
        self.x: J = None
        self.w: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: A = None
        self.s: E = None
        self.u: H = None
        self.z: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: D = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.z: B = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: J = None
        self.r: J = None
        self.v: C = None
        self.x: J = None
        self.w: H = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: D = None
        self.p: A = None
        self.s: E = None
        self.u: H = None
        self.z: A = None
        self.o: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.u: D = None
        self.p: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: B = None
        self.x: A = None
        self.z: B = None
        self.txt = txt

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

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

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

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