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

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.w: F = None
        self.t: E = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.q: G = None
        self.x: A = None
        self.w: F = None
        self.t: E = None
        self.o: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: D = None
        self.txt = txt

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

n.y = l
n.t = e
n.v = e
n.z = d
n.q = j
n.x = h
n.u = m
l.q = h
l.u = h
l.s = j
l.o = j
l.r = n
l.v = n
l.w = b
j.q = n
j.r = h
j.t = m
j.v = e
d.q = b
d.x = n
d.w = e
d.t = h
d.o = l
h.s = l
h.v = n
h.r = n
h.w = m
h.t = j
h.o = j
e.r = b
b.o = l
b.w = h
b.t = j
m.w = d
m.t = d
assert m.w.x.x.w.w.o.u.w.txt == "m"