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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.q: A = None
        self.x: G = None
        self.v: H = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: H = None
        self.r: G = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: F = None
        self.p: H = None
        self.q: A = None
        self.x: G = None
        self.v: H = None
        self.y: H = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: H = None
        self.r: G = None
        self.s: D = None
        self.w: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: C = None
        self.s: C = None
        self.txt = txt

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

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

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

c.v = d
c.s = h
a.q = n
n.o = m
n.p = j
n.v = j
n.y = j
n.q = c
n.x = h
b.z = d
b.w = c
b.u = n
b.y = n
e.o = n
e.v = j
e.r = h
e.w = h
e.s = b
m.o = n
m.s = n
h.x = c
h.q = b
h.w = m
j.o = n
j.v = c
j.y = h
d.o = n
d.s = n
assert n.q.s.q.w.v.s.x.txt == "h"