class A:
    def __init__(self, txt: str):
        self.w: D = None
        self.s: I = None
        self.o: I = None
        self.x: I = None
        self.p: H = None
        self.y: J = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: A = None
        self.r: B = None
        self.z: A = None
        self.o: F = None
        self.w: B = None
        self.p: G = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: B = None
        self.x: C = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: A = None
        self.y: B = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: J = None
        self.x: A = None
        self.w: G = None
        self.v: B = None
        self.u: I = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: C = None
        self.x: B = None
        self.t: D = None
        self.v: G = None
        self.u: G = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.y: F = None
        self.v: B = None
        self.w: H = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.r: D = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.y: J = None
        self.t: A = None
        self.r: B = None
        self.z: A = None
        self.o: F = None
        self.w: B = None
        self.p: G = None
        self.s: H = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.v: F = None
        self.r: B = None
        self.x: C = None
        self.z: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.q: J = None
        self.z: A = None
        self.y: B = None
        self.r: C = None
        self.txt = txt

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

class H:
    def __init__(self, txt: str):
        self.z: B = None
        self.o: J = None
        self.x: A = None
        self.w: G = None
        self.v: B = None
        self.u: I = None
        self.y: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.p: G = None
        self.z: C = None
        self.x: B = None
        self.t: D = None
        self.v: G = None
        self.u: G = None
        self.o: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: C = None
        self.y: F = None
        self.v: B = None
        self.w: H = None
        self.txt = txt

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

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