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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: C = None
        self.t: G = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.z: B = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.r: F = None
        self.p: C = None
        self.t: G = None
        self.v: G = None
        self.w: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.u: A = None
        self.s: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: B = None
        self.p: D = None
        self.z: B = None
        self.o: B = None
        self.t: D = None
        self.txt = txt

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

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

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

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

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