class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.r: E = None
        self.v: I = None
        self.p: F = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: I = None
        self.s: E = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.q: A = None
        self.z: J = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: H = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: E = None
        self.w: H = None
        self.z: D = None
        self.x: A = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.w: F = None
        self.o: C = None
        self.t: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.u: I = None
        self.s: E = None
        self.z: J = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.o: A = None
        self.t: A = None
        self.q: A = None
        self.z: J = None
        self.p: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: J = None
        self.y: H = None
        self.x: I = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: H = None
        self.p: E = None
        self.w: H = None
        self.z: D = None
        self.x: A = None
        self.o: J = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.o: E = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.o: B = None
        self.t: F = None
        self.w: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: A = None
        self.v: C = None
        self.w: F = None
        self.o: C = None
        self.t: E = None
        self.txt = txt

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

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