class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.s: C = None
        self.o: E = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: H = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: G = None
        self.txt = txt

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.s: C = None
        self.t: H = None
        self.p: H = None
        self.x: B = None
        self.txt = txt

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

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

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

class H:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: G = None
        self.txt = txt

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

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