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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.y: D = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.w: B = None
        self.x: I = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.p: E = None
        self.o: F = None
        self.y: D = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.t: D = None
        self.v: B = None
        self.w: B = None
        self.x: I = None
        self.txt = txt

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

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

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

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