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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: F = None
        self.u: J = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: J = None
        self.s: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.v: F = None
        self.u: J = None
        self.q: B = None
        self.txt = txt

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

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

class F:
    def __init__(self, txt: str):
        self.t: A = None
        self.y: J = None
        self.s: B = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.p: A = None
        self.v: C = None
        self.z: A = None
        self.txt = txt

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

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