class A:
    def __init__(self, txt: str):
        self.x: F = None
        self.o: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: C = None
        self.u: A = None
        self.y: D = None
        self.p: F = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.t: H = None
        self.u: G = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: I = None
        self.r: A = None
        self.t: H = None
        self.x: F = None
        self.y: C = None
        self.p: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.x: D = None
        self.w: H = None
        self.z: H = None
        self.s: C = None
        self.r: H = None
        self.p: D = None
        self.y: J = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: E = None
        self.q: F = None
        self.x: I = None
        self.w: A = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: B = None
        self.v: D = None
        self.u: I = None
        self.y: A = None
        self.s: F = None
        self.r: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.z: F = None
        self.x: C = None
        self.u: A = None
        self.y: D = None
        self.p: F = None
        self.r: A = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: B = None
        self.q: C = None
        self.t: H = None
        self.u: G = None
        self.w: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: F = None
        self.z: I = None
        self.r: A = None
        self.t: H = None
        self.x: F = None
        self.y: C = None
        self.p: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.q: D = None
        self.x: D = None
        self.w: H = None
        self.z: H = None
        self.s: C = None
        self.r: H = None
        self.p: D = None
        self.y: J = None
        self.v: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.o: I = None
        self.v: E = None
        self.q: F = None
        self.x: I = None
        self.w: A = None
        self.u: D = None
        self.s: E = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: I = None
        self.z: B = None
        self.v: D = None
        self.u: I = None
        self.y: A = None
        self.s: F = None
        self.r: J = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.q: I = None
        self.o: E = None
        self.txt = txt

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

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