class A:
    def __init__(self, txt: str):
        self.o: B = None
        self.p: C = None
        self.x: D = None
        self.w: C = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: E = None
        self.w: B = None
        self.x: C = None
        self.s: H = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: A = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.v: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.v: D = None
        self.y: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: B = None
        self.r: E = None
        self.w: B = None
        self.x: C = None
        self.s: H = None
        self.o: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: A = None
        self.o: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

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

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

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

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