class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.o: G = None
        self.r: D = None
        self.v: H = None
        self.q: E = None
        self.s: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: H = None
        self.r: G = None
        self.s: J = None
        self.o: J = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.p: H = None
        self.z: H = None
        self.v: C = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: D = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.t: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: C = None
        self.z: H = None
        self.r: G = None
        self.s: J = None
        self.o: J = None
        self.p: C = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.p: H = None
        self.z: H = None
        self.v: C = None
        self.w: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: E = None
        self.w: D = None
        self.q: D = None
        self.r: G = None
        self.txt = txt

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

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

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

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