class A:
    def __init__(self, txt: str):
        self.x: H = None
        self.z: E = None
        self.y: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.s: H = None
        self.w: D = None
        self.o: E = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: B = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: A = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.w: B = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.v: A = None
        self.o: G = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.s: H = None
        self.w: D = None
        self.o: E = None
        self.x: D = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.q: H = None
        self.z: B = None
        self.y: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: C = None
        self.s: A = None
        self.v: G = None
        self.y: B = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.o: C = None
        self.w: B = None
        self.v: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.r: H = None
        self.q: B = None
        self.v: A = None
        self.o: G = None
        self.z: B = None
        self.txt = txt

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

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