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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: J = None
        self.r: A = None
        self.s: B = None
        self.t: H = None
        self.u: F = None
        self.p: H = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.x: G = None
        self.v: C = None
        self.t: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: A = None
        self.w: E = None
        self.r: G = None
        self.txt = txt

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

m = A("m")
j = B("j")
h = C("h")
b = D("b")
d = E("d")
k = F("k")
i = G("i")
e = H("e")
f = I("f")
g = J("g")

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

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

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.w: J = None
        self.r: A = None
        self.s: B = None
        self.t: H = None
        self.u: F = None
        self.p: H = None
        self.y: F = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.p: C = None
        self.q: D = None
        self.x: G = None
        self.v: C = None
        self.t: J = None
        self.txt = txt

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

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

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

class I:
    def __init__(self, txt: str):
        self.v: J = None
        self.s: A = None
        self.w: E = None
        self.r: G = None
        self.txt = txt

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

m = A("m")
j = B("j")
h = C("h")
b = D("b")
d = E("d")
k = F("k")
i = G("i")
e = H("e")
f = I("f")
g = J("g")

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