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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: G = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: G = None
        self.q: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.v: D = None
        self.p: G = None
        self.u: A = None
        self.s: A = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.r: E = None
        self.v: G = None
        self.x: D = None
        self.y: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.r: A = None
        self.p: G = None
        self.q: H = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.z: A = None
        self.q: D = None
        self.v: D = None
        self.p: G = None
        self.u: A = None
        self.s: A = None
        self.txt = txt

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

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