class A:
    def __init__(self, txt: str):
        self.s: I = None
        self.t: J = None
        self.o: D = None
        self.r: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.o: F = None
        self.v: I = None
        self.r: J = None
        self.w: E = None
        self.z: A = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.t: G = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: A = None
        self.v: J = None
        self.y: J = None
        self.t: A = None
        self.txt = txt

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

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

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

class B:
    def __init__(self, txt: str):
        self.x: E = None
        self.z: E = None
        self.t: D = None
        self.u: C = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.s: G = None
        self.y: A = None
        self.o: F = None
        self.v: I = None
        self.r: J = None
        self.w: E = None
        self.z: A = None
        self.p: G = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.o: H = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.o: G = None
        self.r: B = None
        self.t: G = None
        self.q: J = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.y: E = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.u: F = None
        self.r: D = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.q: I = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: J = None
        self.w: A = None
        self.v: J = None
        self.y: J = None
        self.t: A = None
        self.txt = txt

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

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

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