class A:
    def __init__(self, txt: str):
        self.w: E = None
        self.r: E = None
        self.u: G = None
        self.q: C = None
        self.v: I = None
        self.z: D = None
        self.o: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: F = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: G = None
        self.v: I = None
        self.s: C = None
        self.w: G = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: B = None
        self.r: I = None
        self.v: G = None
        self.x: J = None
        self.t: I = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: C = None
        self.y: B = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.y: F = None
        self.q: A = None
        self.r: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: E = None
        self.o: G = None
        self.t: I = None
        self.s: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: C = None
        self.z: G = None
        self.v: I = None
        self.s: C = None
        self.w: G = None
        self.p: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.o: B = None
        self.r: I = None
        self.v: G = None
        self.x: J = None
        self.t: I = None
        self.p: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.r: C = None
        self.y: B = None
        self.z: F = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.txt = txt

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

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

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