class A:
    def __init__(self, txt: str):
        self.x: B = None
        self.txt = txt

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: I = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: G = None
        self.v: C = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.u: G = None
        self.z: I = None
        self.t: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.x: H = None
        self.s: G = None
        self.v: C = None
        self.z: G = None
        self.p: D = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: B = None
        self.o: B = None
        self.u: A = None
        self.txt = txt

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

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

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

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

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