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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.o: G = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: C = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: B = None
        self.w: G = None
        self.t: A = None
        self.o: A = None
        self.p: G = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: B = None
        self.o: H = None
        self.w: B = None
        self.y: A = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: B = None
        self.o: G = None
        self.q: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: E = None
        self.u: E = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: F = None
        self.z: C = None
        self.p: C = None
        self.q: C = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: C = None
        self.z: B = None
        self.w: G = None
        self.t: A = None
        self.o: A = None
        self.p: G = None
        self.q: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.v: B = None
        self.o: H = None
        self.w: B = None
        self.y: A = None
        self.t: A = None
        self.u: F = None
        self.txt = txt

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

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

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