class A:
    def __init__(self, txt: str):
        self.z: H = None
        self.x: C = None
        self.r: D = None
        self.y: I = None
        self.s: H = None
        self.u: H = None
        self.v: D = None
        self.q: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.t: F = None
        self.v: E = None
        self.z: A = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: I = None
        self.z: A = None
        self.t: I = None
        self.u: H = None
        self.o: B = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: A = None
        self.z: H = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: C = None
        self.z: B = None
        self.p: B = None
        self.y: D = None
        self.x: B = None
        self.r: I = None
        self.w: D = None
        self.t: I = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.u: A = None
        self.r: F = None
        self.t: F = None
        self.v: E = None
        self.z: A = None
        self.x: F = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: I = None
        self.z: A = None
        self.t: I = None
        self.u: H = None
        self.o: B = None
        self.v: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: A = None
        self.z: H = None
        self.o: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.s: C = None
        self.z: B = None
        self.p: B = None
        self.y: D = None
        self.x: B = None
        self.r: I = None
        self.w: D = None
        self.t: I = None
        self.txt = txt

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

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

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