class A:
    def __init__(self, txt: str):
        self.p: F = None
        self.q: C = None
        self.s: E = None
        self.r: F = None
        self.t: I = None
        self.y: B = None
        self.w: C = None
        self.v: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: G = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: H = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.r: I = None
        self.q: D = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.x: G = None
        self.u: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: H = None
        self.v: D = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: D = None
        self.x: I = None
        self.r: I = None
        self.q: D = None
        self.s: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

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

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

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

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