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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: E = None
        self.v: H = None
        self.s: D = None
        self.r: A = None
        self.y: E = None
        self.z: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: I = None
        self.y: F = None
        self.x: J = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: G = None
        self.q: H = None
        self.v: A = None
        self.u: F = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: H = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: F = None
        self.o: J = None
        self.y: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: B = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: F = None
        self.x: C = None
        self.u: F = None
        self.w: F = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: H = None
        self.r: E = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.q: H = None
        self.x: E = None
        self.v: H = None
        self.s: D = None
        self.r: A = None
        self.y: E = None
        self.z: E = None
        self.u: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.u: D = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.w: B = None
        self.s: I = None
        self.y: F = None
        self.x: J = None
        self.z: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.z: A = None
        self.p: G = None
        self.q: H = None
        self.v: A = None
        self.u: F = None
        self.x: B = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.u: B = None
        self.z: H = None
        self.s: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: F = None
        self.o: J = None
        self.y: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.o: J = None
        self.x: B = None
        self.q: J = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.z: J = None
        self.v: F = None
        self.x: C = None
        self.u: F = None
        self.w: F = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: F = None
        self.u: H = None
        self.r: E = None
        self.txt = txt

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

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