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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: C = None
        self.t: C = None
        self.r: B = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: B = None
        self.q: C = None
        self.t: C = None
        self.r: B = None
        self.x: C = None
        self.txt = txt

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

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