class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: C = None
        self.z: B = None
        self.q: D = None
        self.x: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.w: A = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: C = None
        self.q: E = None
        self.r: F = None
        self.x: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: B = None
        self.o: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: E = None
        self.u: E = None
        self.w: A = None
        self.t: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: A = None
        self.v: C = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: G = None
        self.w: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: D = None
        self.o: C = None
        self.q: E = None
        self.r: F = None
        self.x: D = None
        self.txt = txt

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

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

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