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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: D = None
        self.w: B = None
        self.q: J = None
        self.v: H = None
        self.r: D = None
        self.p: H = None
        self.s: G = None
        self.o: D = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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

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

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

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

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

class F:
    def __init__(self, txt: str):
        self.x: B = None
        self.u: D = None
        self.w: B = None
        self.q: J = None
        self.v: H = None
        self.r: D = None
        self.p: H = None
        self.s: G = None
        self.o: D = None
        self.z: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.u: F = None
        self.txt = txt

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

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

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

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