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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: D = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: B = None
        self.r: E = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: E = None
        self.q: E = None
        self.w: D = None
        self.p: B = None
        self.s: D = None
        self.o: D = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: I = None
        self.q: B = None
        self.t: C = None
        self.r: D = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.v: D = None
        self.x: D = None
        self.y: A = None
        self.t: G = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: A = None
        self.u: B = None
        self.r: E = None
        self.t: H = None
        self.o: H = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.t: E = None
        self.q: E = None
        self.w: D = None
        self.p: B = None
        self.s: D = None
        self.o: D = None
        self.y: D = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.s: F = None
        self.x: I = None
        self.q: B = None
        self.t: C = None
        self.r: D = None
        self.z: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.q: D = None
        self.u: E = None
        self.p: C = None
        self.txt = txt

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

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