class A:
    def __init__(self, txt: str):
        self.v: I = None
        self.p: D = None
        self.o: J = None
        self.t: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: I = None
        self.z: E = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: J = None
        self.r: G = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: I = None
        self.x: B = None
        self.t: J = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: F = None
        self.o: I = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.p: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.t: H = None
        self.w: H = None
        self.y: E = None
        self.s: I = None
        self.r: A = None
        self.z: E = None
        self.o: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: I = None
        self.z: E = None
        self.s: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: J = None
        self.x: J = None
        self.r: G = None
        self.s: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: J = None
        self.r: I = None
        self.x: B = None
        self.t: J = None
        self.y: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.y: F = None
        self.o: I = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: G = None
        self.r: A = None
        self.p: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: E = None
        self.x: F = None
        self.t: H = None
        self.w: H = None
        self.y: E = None
        self.s: I = None
        self.r: A = None
        self.z: E = None
        self.o: H = None
        self.txt = txt

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

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