class A:
    def __init__(self, txt: str):
        self.y: H = None
        self.z: G = None
        self.p: C = None
        self.t: C = None
        self.x: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: D = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: B = None
        self.s: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: I = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: I = None
        self.w: I = None
        self.q: B = None
        self.y: B = None
        self.o: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: E = None
        self.t: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: I = None
        self.y: D = None
        self.s: A = None
        self.w: F = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: F = None
        self.p: B = None
        self.s: A = None
        self.w: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: I = None
        self.w: I = None
        self.q: B = None
        self.v: E = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.s: I = None
        self.w: I = None
        self.q: B = None
        self.y: B = None
        self.o: A = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.q: C = None
        self.v: E = None
        self.t: H = None
        self.txt = txt

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

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