class A:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: H = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.r: C = None
        self.u: A = None
        self.z: G = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
d = C("d")
m = D("m")
g = E("g")
l = F("l")
j = G("j")
i = H("i")
c = C("c")

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

class B:
    def __init__(self, txt: str):
        self.o: C = None
        self.z: H = None
        self.s: D = None
        self.y: C = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.s: A = None
        self.p: F = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.w: A = None
        self.v: A = None
        self.s: C = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.w: G = None
        self.r: C = None
        self.u: A = None
        self.z: G = None
        self.s: A = None
        self.o: A = None
        self.txt = txt

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

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

n = A("n")
h = B("h")
d = C("d")
m = D("m")
g = E("g")
l = F("l")
j = G("j")
i = H("i")
c = C("c")

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