class A:
    def __init__(self, txt: str):
        self.y: I = None
        self.w: C = None
        self.z: I = None
        self.s: J = None
        self.r: J = None
        self.txt = txt

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

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

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: I = None
        self.u: I = None
        self.v: D = None
        self.x: E = None
        self.s: B = None
        self.z: D = None
        self.q: E = None
        self.t: I = None
        self.o: I = None
        self.txt = txt

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

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

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

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

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

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

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.r: E = None
        self.y: I = None
        self.u: I = None
        self.v: D = None
        self.x: E = None
        self.s: B = None
        self.z: D = None
        self.q: E = None
        self.t: I = None
        self.o: I = None
        self.txt = txt

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

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