class A:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: B = None
        self.q: J = None
        self.y: D = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.y: H = None
        self.v: C = None
        self.t: I = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: H = None
        self.x: H = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: J = None
        self.s: B = None
        self.v: J = None
        self.t: C = None
        self.r: F = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: E = None
        self.y: D = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: G = None
        self.q: D = None
        self.y: H = None
        self.v: C = None
        self.t: I = None
        self.s: G = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.r: J = None
        self.v: H = None
        self.x: H = None
        self.u: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: E = None
        self.p: E = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.y: J = None
        self.x: J = None
        self.s: B = None
        self.v: J = None
        self.t: C = None
        self.r: F = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.r: F = None
        self.o: E = None
        self.y: D = None
        self.txt = txt

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

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

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