class A:
    def __init__(self, txt: str):
        self.v: B = None
        self.x: E = None
        self.u: C = None
        self.s: H = None
        self.z: C = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.t: B = None
        self.txt = txt

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

h = A("h")
n = B("n")
a = C("a")
g = D("g")
d = E("d")
b = F("b")
e = G("e")
m = H("m")
j = G("j")
f = H("f")

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

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

class C:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: E = None
        self.q: D = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: A = None
        self.t: B = None
        self.txt = txt

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

h = A("h")
n = B("n")
a = C("a")
g = D("g")
d = E("d")
b = F("b")
e = G("e")
m = H("m")
j = G("j")
f = H("f")

h.v = n
h.x = d
h.u = a
h.z = a
h.s = f
n.z = g
n.q = m
a.s = b
a.z = d
a.q = g
g.q = b
g.t = d
g.u = m
g.s = h
d.t = n
d.s = b
d.r = h
d.u = g
d.w = f
d.y = f
d.q = a
b.q = j
b.x = g
b.t = d
e.q = j
e.z = h
e.t = n
m.y = b
m.z = a
j.q = e
j.z = h
j.t = n
f.y = b
f.z = a
assert b.q.z.v.txt == "n"