class A:
    def __init__(self, txt: str):
        self.z: C = None
        self.o: J = None
        self.q: G = None
        self.v: H = None
        self.r: C = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: H = None
        self.u: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: H = None
        self.x: C = None
        self.p: E = None
        self.w: H = None
        self.r: A = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: I = None
        self.w: E = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: A = None
        self.x: H = None
        self.u: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: I = None
        self.v: H = None
        self.x: C = None
        self.p: E = None
        self.w: H = None
        self.r: A = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.p: F = None
        self.w: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.o: F = None
        self.u: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: H = None
        self.y: I = None
        self.w: E = None
        self.txt = txt

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

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