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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.v: H = None
        self.o: H = None
        self.p: F = None
        self.z: F = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: F = None
        self.w: F = None
        self.u: G = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.w: B = None
        self.u: J = None
        self.s: A = None
        self.y: C = None
        self.z: C = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.z: D = None
        self.w: I = None
        self.t: H = None
        self.p: H = None
        self.y: G = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
k = D("k")
l = E("l")
i = F("i")
g = G("g")
h = H("h")
f = I("f")
b = J("b")

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

class B:
    def __init__(self, txt: str):
        self.x: G = None
        self.q: G = None
        self.v: H = None
        self.o: H = None
        self.p: F = None
        self.z: F = None
        self.r: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: D = None
        self.y: B = None
        self.o: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.v: B = None
        self.y: F = None
        self.w: F = None
        self.u: G = None
        self.r: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.v: E = None
        self.x: D = None
        self.w: B = None
        self.u: J = None
        self.s: A = None
        self.y: C = None
        self.z: C = None
        self.r: I = None
        self.txt = txt

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

class I:
    def __init__(self, txt: str):
        self.t: H = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.r: G = None
        self.q: G = None
        self.z: D = None
        self.w: I = None
        self.t: H = None
        self.p: H = None
        self.y: G = None
        self.txt = txt

e = A("e")
d = B("d")
a = C("a")
k = D("k")
l = E("l")
i = F("i")
g = G("g")
h = H("h")
f = I("f")
b = J("b")

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