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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: H = None
        self.q: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: C = None
        self.o: C = None
        self.z: C = None
        self.p: C = None
        self.v: A = None
        self.r: I = None
        self.y: J = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: F = None
        self.q: I = None
        self.u: E = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: C = None
        self.v: A = None
        self.q: I = None
        self.u: A = None
        self.y: I = None
        self.t: D = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.o: H = None
        self.q: C = None
        self.w: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: I = None
        self.t: C = None
        self.o: C = None
        self.z: C = None
        self.p: C = None
        self.v: A = None
        self.r: I = None
        self.y: J = None
        self.w: F = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.p: B = None
        self.v: F = None
        self.q: I = None
        self.u: E = None
        self.r: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: A = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.o: C = None
        self.v: A = None
        self.q: I = None
        self.u: A = None
        self.y: I = None
        self.t: D = None
        self.txt = txt

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

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