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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.r: F = None
        self.w: C = None
        self.txt = txt

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

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

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

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