class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.v: D = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.z: B = None
        self.w: B = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.t: H = None
        self.x: B = None
        self.p: C = None
        self.o: H = None
        self.z: B = None
        self.y: G = None
        self.txt = txt

l = A("l")
d = B("d")
k = C("k")
j = D("j")
b = E("b")
n = F("n")
f = G("f")
e = H("e")
a = H("a")

l.q = n
l.w = n
l.s = n
l.z = n
l.v = j
d.z = j
d.o = a
k.y = d
j.p = b
j.v = e
j.s = d
b.r = d
n.o = j
n.z = j
n.s = k
n.x = k
n.q = b
n.w = e
f.p = d
f.z = d
f.w = d
f.t = k
f.y = j
e.s = l
e.w = d
e.x = d
e.z = d
e.t = a
e.o = a
e.p = k
e.y = f
a.s = l
a.w = d
a.x = d
a.z = d
a.t = e
a.o = e
a.p = k
a.y = f
assert a.p.y.o.s.q.q.r.o.txt == "
class A:
    def __init__(self, txt: str):
        self.q: F = None
        self.w: F = None
        self.v: D = None
        self.s: F = None
        self.z: F = None
        self.txt = txt

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

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.p: B = None
        self.t: C = None
        self.z: B = None
        self.w: B = None
        self.y: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: A = None
        self.w: B = None
        self.t: H = None
        self.x: B = None
        self.p: C = None
        self.o: H = None
        self.z: B = None
        self.y: G = None
        self.txt = txt

l = A("l")
d = B("d")
k = C("k")
j = D("j")
b = E("b")
n = F("n")
f = G("f")
e = H("e")
a = H("a")

l.q = n
l.w = n
l.s = n
l.z = n
l.v = j
d.z = j
d.o = a
k.y = d
j.p = b
j.v = e
j.s = d
b.r = d
n.o = j
n.z = j
n.s = k
n.x = k
n.q = b
n.w = e
f.p = d
f.z = d
f.w = d
f.t = k
f.y = j
e.s = l
e.w = d
e.x = d
e.z = d
e.t = a
e.o = a
e.p = k
e.y = f
a.s = l
a.w = d
a.x = d
a.z = d
a.t = e
a.o = e
a.p = k
a.y = f
assert a.p.y.o.s.q.q.r.o.txt == "a"