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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: J = None
        self.r: A = None
        self.v: E = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: C = None
        self.u: A = None
        self.q: I = None
        self.p: F = None
        self.s: G = None
        self.z: C = None
        self.r: A = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.p: G = None
        self.w: C = None
        self.txt = txt

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

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

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

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

class C:
    def __init__(self, txt: str):
        self.w: D = None
        self.t: J = None
        self.r: A = None
        self.v: E = None
        self.s: F = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: G = None
        self.v: C = None
        self.u: A = None
        self.q: I = None
        self.p: F = None
        self.s: G = None
        self.z: C = None
        self.r: A = None
        self.w: E = None
        self.t: E = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.q: F = None
        self.o: H = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: B = None
        self.u: D = None
        self.p: G = None
        self.w: C = None
        self.txt = txt

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

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

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