class A:
    def __init__(self, txt: str):
        self.r: H = None
        self.txt = txt

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: G = None
        self.p: A = None
        self.r: B = None
        self.s: G = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

m = A("m")
d = B("d")
i = C("i")
n = D("n")
h = E("h")
a = F("a")
k = G("k")
f = H("f")
e = E("e")

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: C = None
        self.q: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: C = None
        self.u: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: G = None
        self.p: A = None
        self.r: B = None
        self.s: G = None
        self.t: D = None
        self.o: E = None
        self.txt = txt

m = A("m")
d = B("d")
i = C("i")
n = D("n")
h = E("h")
a = F("a")
k = G("k")
f = H("f")
e = E("e")

m.r = f
d.x = a
d.u = f
d.s = f
d.z = i
d.o = i
d.p = h
d.y = n
d.t = m
i.t = d
i.w = a
i.r = e
n.x = d
n.q = i
h.o = e
h.v = e
h.t = f
h.z = d
h.w = m
a.w = i
a.q = k
k.y = i
k.u = f
f.v = n
f.t = n
f.y = k
f.s = k
f.p = m
f.r = d
f.o = e
e.o = h
e.v = h
e.t = f
e.z = d
e.w = m
assert h.w.r.o.v.t.t.txt == "n"