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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: H = None
        self.o: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: C = None
        self.x: I = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.w: H = None
        self.q: H = None
        self.o: E = None
        self.r: H = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.r: B = None
        self.t: I = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.q: J = None
        self.s: C = None
        self.x: I = None
        self.r: H = None
        self.txt = txt

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

class F:
    def __init__(self, txt: str):
        self.z: A = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.z: H = None
        self.r: F = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.s: D = None
        self.u: C = None
        self.w: C = None
        self.r: I = None
        self.txt = txt

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

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

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

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