class A:
    def __init__(self, txt: str):
        self.q: D = None
        self.x: F = None
        self.t: B = None
        self.p: E = None
        self.r: F = None
        self.o: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: C = None
        self.z: D = None
        self.r: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.y: C = None
        self.z: D = None
        self.r: C = None
        self.q: D = None
        self.txt = txt

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

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

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

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

class G:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

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

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

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