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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: A = None
        self.p: B = None
        self.z: A = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: H = None
        self.v: J = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.y: D = None
        self.x: A = None
        self.p: B = None
        self.z: A = None
        self.v: B = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.x: D = None
        self.t: G = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.q: D = None
        self.p: H = None
        self.v: J = None
        self.w: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: F = None
        self.s: D = None
        self.t: A = None
        self.v: B = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.s: B = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.w: G = None
        self.txt = txt

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

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