class A:
    def __init__(self, txt: str):
        self.t: F = None
        self.v: I = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: G = None
        self.o: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: F = None
        self.v: B = None
        self.p: D = None
        self.q: B = None
        self.txt = txt

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

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

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

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.u: J = None
        self.q: G = None
        self.o: A = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.x: E = None
        self.s: F = None
        self.v: B = None
        self.p: D = None
        self.q: B = None
        self.txt = txt

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

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