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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: H = None
        self.o: A = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: B = None
        self.p: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.w: H = None
        self.o: A = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.s: E = None
        self.z: B = None
        self.p: G = None
        self.w: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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