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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: C = None
        self.p: A = None
        self.y: E = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: E = None
        self.y: I = None
        self.q: D = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.w: C = None
        self.p: A = None
        self.q: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: B = None
        self.w: C = None
        self.z: D = None
        self.y: A = None
        self.u: E = None
        self.s: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.o: C = None
        self.p: A = None
        self.y: E = None
        self.w: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.t: I = None
        self.v: E = None
        self.y: I = None
        self.q: D = None
        self.x: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.x: A = None
        self.w: C = None
        self.p: A = None
        self.q: E = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.o: F = None
        self.y: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: D = None
        self.o: B = None
        self.w: C = None
        self.z: D = None
        self.y: A = None
        self.u: E = None
        self.s: F = None
        self.txt = txt

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

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