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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

c = A("c")
h = B("h")
m = C("m")
k = D("k")
f = E("f")
i = F("i")
j = G("j")
n = H("n")

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.p: F = None
        self.t: B = None
        self.x: A = None
        self.o: B = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.v: C = None
        self.txt = txt

c = A("c")
h = B("h")
m = C("m")
k = D("k")
f = E("f")
i = F("i")
j = G("j")
n = H("n")

c.z = i
h.o = c
h.u = c
h.t = j
h.z = k
h.w = k
h.v = k
h.r = n
m.o = h
k.x = c
f.p = i
f.t = h
f.o = h
f.x = c
i.s = m
j.t = h
j.v = h
j.q = n
j.z = n
j.r = n
j.x = k
j.w = c
j.p = m
n.v = m
assert j.p.o.z.x.txt == "c"