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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: H = None
        self.u: C = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

f = A("f")
k = B("k")
c = C("c")
g = D("g")
b = E("b")
n = F("n")
d = G("d")
m = H("m")
e = I("e")
a = J("a")

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

class B:
    def __init__(self, txt: str):
        self.q: A = None
        self.t: I = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.y: J = None
        self.v: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: G = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.o: H = None
        self.u: C = None
        self.v: J = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.w: C = None
        self.txt = txt

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

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

f = A("f")
k = B("k")
c = C("c")
g = D("g")
b = E("b")
n = F("n")
d = G("d")
m = H("m")
e = I("e")
a = J("a")

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