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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: J = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = 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.r: A = None
        self.t: D = None
        self.v: H = None
        self.p: I = None
        self.x: C = None
        self.o: A = None
        self.q: H = None
        self.w: B = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: H = None
        self.q: A = None
        self.u: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

l = A("l")
c = B("c")
m = C("m")
a = D("a")
k = E("k")
n = F("n")
h = G("h")
g = H("g")
b = I("b")
j = J("j")

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

class B:
    def __init__(self, txt: str):
        self.v: A = None
        self.r: J = None
        self.s: F = None
        self.o: D = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.y: G = 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.r: A = None
        self.t: D = None
        self.v: H = None
        self.p: I = None
        self.x: C = None
        self.o: A = None
        self.q: H = None
        self.w: B = None
        self.s: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.y: D = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.t: F = None
        self.r: H = None
        self.q: A = None
        self.u: G = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.o: B = None
        self.txt = txt

l = A("l")
c = B("c")
m = C("m")
a = D("a")
k = E("k")
n = F("n")
h = G("h")
g = H("g")
b = I("b")
j = J("j")

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