class A:
    def __init__(self, txt: str):
        self.z: B = None
        self.v: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: A = None
        self.y: J = None
        self.u: F = None
        self.x: I = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: E = None
        self.z: C = None
        self.y: B = None
        self.o: F = None
        self.w: F = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.v: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.s: F = None
        self.q: H = None
        self.o: H = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.z: A = None
        self.y: I = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: B = None
        self.w: F = None
        self.y: C = None
        self.u: F = None
        self.p: A = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.v: A = None
        self.y: J = None
        self.u: F = None
        self.x: I = None
        self.z: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.x: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: E = None
        self.z: C = None
        self.y: B = None
        self.o: F = None
        self.w: F = None
        self.s: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.x: E = None
        self.v: G = None
        self.t: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.u: E = None
        self.r: A = None
        self.s: F = None
        self.q: H = None
        self.o: H = None
        self.x: D = None
        self.p: H = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: B = None
        self.v: D = None
        self.z: A = None
        self.y: I = None
        self.p: G = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.s: B = None
        self.w: F = None
        self.y: C = None
        self.u: F = None
        self.p: A = None
        self.z: E = None
        self.q: F = None
        self.txt = txt

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

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