class A:
    def __init__(self, txt: str):
        self.z: E = None
        self.x: C = None
        self.p: E = None
        self.q: H = None
        self.o: H = None
        self.v: D = None
        self.t: C = None
        self.r: H = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: B = None
        self.q: E = None
        self.t: G = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.x: F = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: A = None
        self.y: B = None
        self.q: E = None
        self.t: G = None
        self.x: D = None
        self.r: D = None
        self.txt = txt

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.r: F = None
        self.t: F = None
        self.x: F = None
        self.z: C = None
        self.v: C = None
        self.txt = txt

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

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