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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: G = None
        self.q: B = None
        self.t: F = None
        self.x: C = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.y: A = None
        self.s: G = None
        self.q: B = None
        self.t: F = None
        self.x: C = None
        self.txt = txt

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

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