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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: E = None
        self.s: A = None
        self.v: E = None
        self.x: C = None
        self.o: E = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.w: G = None
        self.v: I = None
        self.s: B = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: D = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.z: D = None
        self.r: E = None
        self.s: A = None
        self.v: E = None
        self.x: C = None
        self.o: E = None
        self.u: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: B = None
        self.w: G = None
        self.v: I = None
        self.s: B = None
        self.u: G = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: G = None
        self.s: D = None
        self.r: I = None
        self.txt = txt

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

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

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

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

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