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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.x: E = None
        self.r: F = None
        self.q: D = None
        self.s: B = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: E = None
        self.x: E = None
        self.r: F = None
        self.q: D = None
        self.s: B = None
        self.y: E = None
        self.w: F = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: C = None
        self.w: B = None
        self.txt = txt

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

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