class A:
    def __init__(self, txt: str):
        self.s: D = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: B = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: C = None
        self.t: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: C = None
        self.w: G = None
        self.y: B = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.y: I = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: D = None
        self.o: B = None
        self.x: C = None
        self.p: C = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.u: C = None
        self.t: A = None
        self.o: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.u: D = None
        self.p: C = None
        self.w: G = None
        self.y: B = None
        self.txt = txt

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

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

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