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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: I = None
        self.s: A = None
        self.p: J = None
        self.q: G = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: H = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: H = None
        self.x: E = None
        self.p: B = None
        self.z: G = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.s: F = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: A = None
        self.x: B = None
        self.t: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: H = None
        self.t: I = None
        self.s: A = None
        self.p: J = None
        self.q: G = None
        self.u: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: H = None
        self.y: H = None
        self.q: A = None
        self.v: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.s: J = None
        self.y: H = None
        self.x: E = None
        self.p: B = None
        self.z: G = None
        self.o: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.t: E = None
        self.o: A = None
        self.s: F = None
        self.y: D = None
        self.txt = txt

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

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