class A:
    def __init__(self, txt: str):
        self.q: H = None
        self.u: B = None
        self.z: B = None
        self.w: E = None
        self.x: I = None
        self.p: B = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: I = None
        self.v: C = None
        self.q: G = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: B = None
        self.v: J = None
        self.y: H = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: C = None
        self.w: G = None
        self.u: A = None
        self.s: C = None
        self.o: I = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.v: D = None
        self.p: A = None
        self.q: A = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.o: B = None
        self.q: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: G = None
        self.o: I = None
        self.v: C = None
        self.q: G = None
        self.s: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: H = None
        self.z: B = None
        self.v: J = None
        self.y: H = None
        self.s: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: J = None
        self.x: C = None
        self.w: G = None
        self.u: A = None
        self.s: C = None
        self.o: I = None
        self.y: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: F = None
        self.x: B = None
        self.v: D = None
        self.p: A = None
        self.q: A = None
        self.r: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.s: B = None
        self.x: H = None
        self.z: B = None
        self.txt = txt

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

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