class A:
    def __init__(self, txt: str):
        self.t: H = None
        self.x: I = None
        self.q: C = None
        self.r: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: I = None
        self.v: E = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: J = None
        self.p: G = None
        self.w: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: H = None
        self.o: H = None
        self.q: F = None
        self.y: A = None
        self.z: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: C = None
        self.x: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: D = None
        self.w: I = None
        self.v: E = None
        self.z: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: H = None
        self.o: J = None
        self.p: G = None
        self.w: J = None
        self.v: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.p: H = None
        self.o: H = None
        self.q: F = None
        self.y: A = None
        self.z: H = None
        self.txt = txt

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

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