class A:
    def __init__(self, txt: str):
        self.z: J = None
        self.t: D = None
        self.r: J = None
        self.w: I = None
        self.s: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: D = None
        self.p: C = None
        self.z: A = None
        self.q: D = None
        self.w: J = None
        self.o: D = None
        self.s: J = None
        self.r: F = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: E = None
        self.q: E = None
        self.y: D = None
        self.x: D = None
        self.r: B = None
        self.v: H = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: E = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.v: C = None
        self.x: D = None
        self.p: C = None
        self.z: A = None
        self.q: D = None
        self.w: J = None
        self.o: D = None
        self.s: J = None
        self.r: F = None
        self.u: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: H = None
        self.p: E = None
        self.q: E = None
        self.y: D = None
        self.x: D = None
        self.r: B = None
        self.v: H = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: F = None
        self.txt = txt

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

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

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

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