class A:
    def __init__(self, txt: str):
        self.p: D = None
        self.v: D = None
        self.s: H = None
        self.z: H = None
        self.q: A = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.t: D = None
        self.s: E = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.v: E = None
        self.w: C = None
        self.u: H = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.y: E = None
        self.t: D = None
        self.s: E = None
        self.o: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: B = None
        self.p: E = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.p: D = None
        self.s: F = None
        self.v: E = None
        self.w: C = None
        self.u: H = None
        self.txt = txt

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

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

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