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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: H = None
        self.t: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: F = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: I = None
        self.u: C = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.q: G = None
        self.z: H = None
        self.t: C = None
        self.x: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.z: J = None
        self.u: F = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.z: E = None
        self.t: I = None
        self.u: C = None
        self.y: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.y: J = None
        self.txt = txt

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

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

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

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

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

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