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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.p: D = None
        self.z: H = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.z: H = None
        self.y: A = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: B = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.r: B = None
        self.z: I = None
        self.s: I = None
        self.t: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.x: B = None
        self.r: B = None
        self.p: D = None
        self.z: H = None
        self.t: A = None
        self.o: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.o: B = None
        self.z: H = None
        self.y: A = None
        self.p: B = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.x: J = None
        self.q: B = None
        self.y: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: E = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.u: G = None
        self.w: D = None
        self.r: B = None
        self.z: I = None
        self.s: I = None
        self.t: H = None
        self.txt = txt

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

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