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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: C = None
        self.o: F = None
        self.x: J = None
        self.z: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.u: F = None
        self.v: J = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: G = None
        self.v: A = None
        self.s: B = None
        self.z: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.u: C = None
        self.o: F = None
        self.x: J = None
        self.z: J = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.r: E = None
        self.u: F = None
        self.v: J = None
        self.y: D = None
        self.t: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.y: G = None
        self.v: A = None
        self.s: B = None
        self.z: H = None
        self.txt = txt

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

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