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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.y: E = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: A = None
        self.u: J = None
        self.w: C = None
        self.x: B = None
        self.v: I = None
        self.q: D = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: F = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.w: B = None
        self.x: B = None
        self.o: D = None
        self.q: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.q: C = None
        self.y: E = None
        self.w: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.s: D = None
        self.t: A = None
        self.u: J = None
        self.w: C = None
        self.x: B = None
        self.v: I = None
        self.q: D = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.p: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: C = None
        self.s: F = None
        self.o: C = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.r: A = None
        self.w: B = None
        self.x: B = None
        self.o: D = None
        self.q: H = None
        self.txt = txt

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

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

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