class A:
    def __init__(self, txt: str):
        self.z: F = None
        self.t: D = None
        self.y: D = None
        self.s: H = None
        self.q: G = None
        self.u: D = None
        self.x: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: H = None
        self.t: H = None
        self.s: F = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: D = None
        self.p: C = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.y: F = None
        self.x: C = None
        self.z: D = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

f = A("f")
b = B("b")
n = C("n")
h = D("h")
a = E("a")
i = F("i")
l = G("l")
j = H("j")
m = G("m")

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

class B:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: H = None
        self.t: H = None
        self.s: F = None
        self.r: C = None
        self.z: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: B = None
        self.v: D = None
        self.p: C = None
        self.o: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: E = None
        self.y: F = None
        self.x: C = None
        self.z: D = None
        self.o: B = None
        self.u: G = None
        self.txt = txt

f = A("f")
b = B("b")
n = C("n")
h = D("h")
a = E("a")
i = F("i")
l = G("l")
j = H("j")
m = G("m")

f.z = i
f.t = h
f.y = h
f.u = h
f.s = j
f.x = j
f.q = l
b.r = j
n.s = h
h.s = a
h.r = a
h.w = a
h.q = l
h.y = b
a.w = f
a.x = j
a.t = j
a.s = i
a.r = n
a.z = m
i.t = b
i.v = h
i.o = h
i.p = n
l.y = i
l.w = i
l.t = m
l.q = j
l.z = a
l.x = n
j.p = h
j.z = h
j.v = a
j.y = i
j.x = n
j.o = b
j.u = l
m.y = i
m.w = i
m.t = l
m.q = j
m.z = a
m.x = n
assert m.z.s.p.s.q.x.txt == "n"