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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.p: H = None
        self.y: D = None
        self.r: D = None
        self.t: E = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: F = None
        self.s: C = None
        self.p: H = None
        self.y: D = None
        self.r: D = None
        self.t: E = None
        self.q: D = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

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

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

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