class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.x: H = None
        self.q: E = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: I = None
        self.t: F = None
        self.w: G = None
        self.p: I = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.w: E = None
        self.p: I = None
        self.u: C = None
        self.x: F = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: I = None
        self.w: F = None
        self.v: G = None
        self.z: I = None
        self.r: G = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: D = None
        self.q: C = None
        self.t: D = None
        self.x: E = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.r: A = None
        self.q: G = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.y: C = None
        self.x: H = None
        self.q: E = None
        self.s: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: B = None
        self.o: I = None
        self.t: F = None
        self.w: G = None
        self.p: I = None
        self.r: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: F = None
        self.y: E = None
        self.w: E = None
        self.p: I = None
        self.u: C = None
        self.x: F = None
        self.t: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: I = None
        self.w: F = None
        self.v: G = None
        self.z: I = None
        self.r: G = None
        self.q: H = None
        self.t: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: A = None
        self.w: D = None
        self.q: C = None
        self.t: D = None
        self.x: E = None
        self.p: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.z: G = None
        self.x: D = None
        self.r: A = None
        self.q: G = None
        self.v: A = None
        self.p: C = None
        self.txt = txt

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

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