class A:
    def __init__(self, txt: str):
        self.u: J = None
        self.o: H = None
        self.t: D = None
        self.w: H = None
        self.s: I = None
        self.z: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: C = None
        self.v: G = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: I = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.p: I = None
        self.s: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: G = None
        self.t: C = None
        self.v: G = None
        self.s: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.z: I = None
        self.txt = txt

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

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