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

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

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: H = None
        self.r: E = None
        self.q: G = None
        self.x: J = None
        self.t: E = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: C = None
        self.o: J = None
        self.v: I = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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

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

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

class D:
    def __init__(self, txt: str):
        self.t: J = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: H = None
        self.r: E = None
        self.q: G = None
        self.x: J = None
        self.t: E = None
        self.w: B = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.t: G = None
        self.y: C = None
        self.o: J = None
        self.v: I = None
        self.w: A = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: G = None
        self.txt = txt

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

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

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