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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: B = None
        self.q: G = None
        self.u: C = None
        self.z: A = None
        self.o: H = None
        self.r: B = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.v: E = None
        self.t: B = None
        self.q: G = None
        self.u: C = None
        self.z: A = None
        self.o: H = None
        self.r: B = None
        self.p: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.txt = txt

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

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

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