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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: C = None
        self.x: F = None
        self.u: H = None
        self.t: D = None
        self.v: G = None
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.y: H = None
        self.q: G = None
        self.w: J = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: I = None
        self.p: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: B = None
        self.v: B = None
        self.w: B = None
        self.q: A = None
        self.t: H = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: H = None
        self.w: C = None
        self.x: F = None
        self.u: H = None
        self.t: D = None
        self.v: G = None
        self.r: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.r: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: I = None
        self.u: F = None
        self.y: H = None
        self.q: G = None
        self.w: J = None
        self.r: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.q: I = None
        self.p: H = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.o: G = None
        self.y: B = None
        self.v: B = None
        self.w: B = None
        self.q: A = None
        self.t: H = None
        self.x: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.r: G = None
        self.t: D = None
        self.txt = txt

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

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