class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: G = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.w: C = None
        self.s: G = None
        self.z: D = None
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: E = None
        self.u: E = None
        self.s: I = None
        self.w: H = None
        self.v: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.u: C = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.w: B = None
        self.u: H = None
        self.p: F = None
        self.s: B = None
        self.o: B = None
        self.txt = txt

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

d.q = m
d.o = j
d.x = h
e.t = c
e.z = c
e.x = f
e.w = h
e.s = j
e.u = i
h.p = i
h.s = i
h.o = i
h.t = j
h.y = c
h.w = c
h.v = a
h.r = m
c.z = l
c.s = l
c.r = a
c.u = a
c.w = m
c.v = h
a.z = c
a.y = c
a.t = j
a.r = j
a.x = d
a.o = i
a.s = h
f.w = e
f.p = c
f.s = l
j.z = f
m.p = d
m.w = j
m.u = h
m.z = i
l.r = d
i.x = a
i.q = d
i.w = e
i.s = e
i.o = e
i.u = m
i.p = f
assert m.p.o.z.w.x.s.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.o: G = None
        self.x: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.t: D = None
        self.x: F = None
        self.w: C = None
        self.s: G = None
        self.z: D = None
        self.u: J = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: I = None
        self.r: E = None
        self.u: E = None
        self.s: I = None
        self.w: H = None
        self.v: C = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.p: A = None
        self.w: G = None
        self.u: C = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.q: A = None
        self.w: B = None
        self.u: H = None
        self.p: F = None
        self.s: B = None
        self.o: B = None
        self.txt = txt

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

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