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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: I = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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

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

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

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

class E:
    def __init__(self, txt: str):
        self.w: D = None
        self.z: I = None
        self.txt = txt

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

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

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

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

class J:
    def __init__(self, txt: str):
        self.o: G = None
        self.txt = txt

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

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