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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.v: A = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.y: G = None
        self.s: F = None
        self.t: G = None
        self.x: E = None
        self.r: B = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: D = None
        self.s: C = None
        self.p: J = None
        self.v: I = None
        self.t: J = None
        self.x: I = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: B = None
        self.x: E = None
        self.u: G = None
        self.r: A = None
        self.q: I = None
        self.z: J = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: F = None
        self.r: F = None
        self.v: A = None
        self.w: E = None
        self.y: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: A = None
        self.w: F = None
        self.y: G = None
        self.s: F = None
        self.t: G = None
        self.x: E = None
        self.r: B = None
        self.q: A = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: C = None
        self.u: D = None
        self.s: C = None
        self.p: J = None
        self.v: I = None
        self.t: J = None
        self.x: I = None
        self.r: A = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: B = None
        self.x: E = None
        self.u: G = None
        self.r: A = None
        self.q: I = None
        self.z: J = None
        self.txt = txt

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

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

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

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