class A:
    def __init__(self, txt: str):
        self.z: I = None
        self.s: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: F = None
        self.r: C = None
        self.s: F = None
        self.q: C = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: G = None
        self.q: E = None
        self.r: A = None
        self.s: C = None
        self.u: B = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: E = None
        self.w: G = None
        self.v: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: D = None
        self.v: F = None
        self.r: C = None
        self.s: F = None
        self.q: C = None
        self.x: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: G = None
        self.q: E = None
        self.r: A = None
        self.s: C = None
        self.u: B = None
        self.txt = txt

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

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

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

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