class A:
    def __init__(self, txt: str):
        self.o: C = None
        self.v: C = None
        self.s: G = None
        self.z: F = None
        self.q: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.y: B = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: J = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: J = None
        self.w: A = None
        self.r: A = None
        self.x: J = None
        self.s: H = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: C = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: D = None
        self.t: C = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.v: D = None
        self.z: H = None
        self.q: G = None
        self.s: J = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.z: D = None
        self.x: I = None
        self.v: A = None
        self.s: C = None
        self.p: D = None
        self.t: A = None
        self.u: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.y: B = None
        self.r: H = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.v: H = None
        self.u: J = None
        self.q: E = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: J = None
        self.w: A = None
        self.r: A = None
        self.x: J = None
        self.s: H = None
        self.z: A = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.p: B = None
        self.y: C = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: B = None
        self.z: D = None
        self.t: C = None
        self.o: B = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.o: E = None
        self.v: D = None
        self.z: H = None
        self.q: G = None
        self.s: J = None
        self.y: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: B = None
        self.q: B = None
        self.z: D = None
        self.x: I = None
        self.v: A = None
        self.s: C = None
        self.p: D = None
        self.t: A = None
        self.u: D = None
        self.txt = txt

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

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