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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: C = None
        self.z: B = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.v: F = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.o: C = None
        self.z: B = None
        self.p: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: C = None
        self.v: F = None
        self.txt = txt

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

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