class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.u: E = None
        self.txt = txt

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: H = None
        self.u: F = None
        self.o: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: A = None
        self.y: F = None
        self.x: F = None
        self.u: J = None
        self.s: E = None
        self.txt = txt

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

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.y: C = None
        self.t: H = None
        self.u: F = None
        self.o: H = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.q: A = None
        self.y: F = None
        self.x: F = None
        self.u: J = None
        self.s: E = None
        self.txt = txt

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

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

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