class A:
    def __init__(self, txt: str):
        self.v: E = None
        self.r: E = None
        self.p: E = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: I = None
        self.q: J = None
        self.u: I = None
        self.r: H = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: H = None
        self.y: D = None
        self.t: A = None
        self.q: D = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: I = None
        self.u: A = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.q: B = None
        self.o: B = None
        self.p: E = None
        self.u: E = None
        self.x: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.t: I = None
        self.q: J = None
        self.u: I = None
        self.r: H = None
        self.s: C = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.u: H = None
        self.y: D = None
        self.t: A = None
        self.q: D = None
        self.w: G = None
        self.z: D = None
        self.txt = txt

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

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: I = None
        self.u: A = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.w: D = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.y: D = None
        self.z: B = None
        self.q: B = None
        self.o: B = None
        self.p: E = None
        self.u: E = None
        self.x: H = None
        self.txt = txt

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

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