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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: G = None
        self.o: C = None
        self.q: D = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: E = None
        self.z: E = None
        self.txt = txt

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

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

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

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

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

class H:
    def __init__(self, txt: str):
        self.x: J = None
        self.s: G = None
        self.o: C = None
        self.q: D = None
        self.r: B = None
        self.y: C = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.w: A = None
        self.txt = txt

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

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