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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.x: A = None
        self.p: B = None
        self.s: F = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: F = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.x: A = None
        self.p: B = None
        self.s: F = None
        self.q: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.o: D = None
        self.w: F = None
        self.t: D = None
        self.y: D = None
        self.txt = txt

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

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

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