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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: E = None
        self.r: H = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.v: C = None
        self.u: H = None
        self.q: A = None
        self.t: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.v: F = None
        self.u: G = None
        self.t: A = None
        self.txt = txt

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

a = A("a")
c = B("c")
m = C("m")
h = D("h")
b = E("b")
l = F("l")
k = G("k")
n = H("n")
i = I("i")
d = J("d")

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

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

class C:
    def __init__(self, txt: str):
        self.v: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.u: I = None
        self.p: E = None
        self.r: H = None
        self.o: C = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.w: A = None
        self.p: E = None
        self.v: C = None
        self.u: H = None
        self.q: A = None
        self.t: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: A = None
        self.v: F = None
        self.u: G = None
        self.t: A = None
        self.txt = txt

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

a = A("a")
c = B("c")
m = C("m")
h = D("h")
b = E("b")
l = F("l")
k = G("k")
n = H("n")
i = I("i")
d = J("d")

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