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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: F = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.u: A = None
        self.v: B = None
        self.p: F = None
        self.s: H = None
        self.t: A = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: G = None
        self.v: E = None
        self.x: H = None
        self.r: H = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: F = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: F = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: F = None
        self.t: C = None
        self.r: A = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: H = None
        self.u: A = None
        self.v: B = None
        self.p: F = None
        self.s: H = None
        self.t: A = None
        self.z: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: C = None
        self.o: G = None
        self.v: E = None
        self.x: H = None
        self.r: H = None
        self.s: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.w: F = None
        self.txt = txt

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

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

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