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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: G = None
        self.u: C = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.u: J = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: G = None
        self.u: C = None
        self.t: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.txt = txt

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

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

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

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

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