class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: G = None
        self.x: B = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: A = None
        self.t: G = None
        self.p: G = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: H = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: F = None
        self.x: B = None
        self.s: H = None
        self.t: G = None
        self.u: E = None
        self.p: F = None
        self.txt = txt

l = A("l")
c = B("c")
a = C("a")
i = D("i")
h = E("h")
k = F("k")
d = G("d")
j = H("j")
f = H("f")

l.v = i
l.z = a
c.s = i
a.r = k
a.x = h
i.v = j
i.s = j
i.q = k
i.o = l
i.x = h
i.z = a
h.q = j
h.r = d
h.x = c
h.w = c
k.v = i
k.x = i
k.z = l
k.t = d
k.p = d
d.r = c
d.w = c
d.s = f
d.u = f
j.y = k
j.v = k
j.p = k
j.x = c
j.s = f
j.t = d
j.u = h
f.y = k
f.v = k
f.p = k
f.x = c
f.s = j
f.t = d
f.u = h
assert j.u.x.s.x.q.x.s.z.txt == "
class A:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: C = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.r: G = None
        self.x: B = None
        self.w: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.v: D = None
        self.z: A = None
        self.t: G = None
        self.p: G = None
        self.x: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.r: B = None
        self.s: H = None
        self.u: H = None
        self.w: B = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.y: F = None
        self.v: F = None
        self.x: B = None
        self.s: H = None
        self.t: G = None
        self.u: E = None
        self.p: F = None
        self.txt = txt

l = A("l")
c = B("c")
a = C("a")
i = D("i")
h = E("h")
k = F("k")
d = G("d")
j = H("j")
f = H("f")

l.v = i
l.z = a
c.s = i
a.r = k
a.x = h
i.v = j
i.s = j
i.q = k
i.o = l
i.x = h
i.z = a
h.q = j
h.r = d
h.x = c
h.w = c
k.v = i
k.x = i
k.z = l
k.t = d
k.p = d
d.r = c
d.w = c
d.s = f
d.u = f
j.y = k
j.v = k
j.p = k
j.x = c
j.s = f
j.t = d
j.u = h
f.y = k
f.v = k
f.p = k
f.x = c
f.s = j
f.t = d
f.u = h
assert j.u.x.s.x.q.x.s.z.txt == "a"