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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.p: A = None
        self.o: A = None
        self.r: A = None
        self.w: F = None
        self.x: I = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.y: A = None
        self.z: B = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: J = None
        self.t: A = None
        self.p: B = None
        self.z: B = None
        self.w: C = None
        self.u: J = None
        self.y: H = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: H = None
        self.z: C = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: I = None
        self.q: C = None
        self.u: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.o: E = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.p: A = None
        self.o: A = None
        self.r: A = None
        self.w: F = None
        self.x: I = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.y: A = None
        self.z: B = None
        self.r: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.o: J = None
        self.t: A = None
        self.p: B = None
        self.z: B = None
        self.w: C = None
        self.u: J = None
        self.y: H = None
        self.v: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: F = None
        self.t: G = None
        self.q: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.p: H = None
        self.z: C = None
        self.v: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: H = None
        self.z: I = None
        self.q: C = None
        self.u: C = None
        self.txt = txt

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

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