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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.z: I = None
        self.t: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: H = None
        self.z: I = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: J = None
        self.x: C = None
        self.u: J = None
        self.y: H = None
        self.q: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.y: D = None
        self.q: I = None
        self.x: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.w: F = None
        self.u: E = None
        self.z: I = None
        self.t: J = None
        self.txt = txt

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

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

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

class F:
    def __init__(self, txt: str):
        self.w: G = None
        self.y: H = None
        self.z: I = None
        self.t: H = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.v: J = None
        self.p: J = None
        self.x: C = None
        self.u: J = None
        self.y: H = None
        self.q: H = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: D = None
        self.t: H = None
        self.y: D = None
        self.q: I = None
        self.x: B = None
        self.txt = txt

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

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