class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.z: H = None
        self.x: E = None
        self.y: H = None
        self.t: H = None
        self.r: H = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: H = None
        self.u: H = None
        self.q: H = None
        self.w: B = None
        self.r: B = None
        self.t: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: F = None
        self.o: E = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: B = None
        self.x: C = None
        self.v: C = None
        self.u: B = None
        self.q: G = None
        self.p: B = None
        self.r: C = None
        self.txt = txt

a = A("a")
b = B("b")
g = C("g")
l = D("l")
i = E("i")
h = F("h")
c = G("c")
k = H("k")

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

class B:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: B = None
        self.p: H = None
        self.u: H = None
        self.q: H = None
        self.w: B = None
        self.r: B = None
        self.t: H = None
        self.txt = txt

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

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

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

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: F = None
        self.o: E = None
        self.v: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: A = None
        self.z: B = None
        self.x: C = None
        self.v: C = None
        self.u: B = None
        self.q: G = None
        self.p: B = None
        self.r: C = None
        self.txt = txt

a = A("a")
b = B("b")
g = C("g")
l = D("l")
i = E("i")
h = F("h")
c = G("c")
k = H("k")

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