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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: H = None
        self.y: E = None
        self.w: G = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: G = None
        self.z: D = None
        self.p: G = None
        self.y: F = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: E = None
        self.p: A = None
        self.x: C = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.t: H = None
        self.v: H = None
        self.y: E = None
        self.w: G = None
        self.p: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: G = None
        self.x: H = None
        self.o: E = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: C = None
        self.v: G = None
        self.z: D = None
        self.p: G = None
        self.y: F = None
        self.s: F = None
        self.r: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: H = None
        self.r: E = None
        self.p: A = None
        self.x: C = None
        self.q: B = None
        self.u: B = None
        self.txt = txt

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

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

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