class A:
    def __init__(self, txt: str):
        self.r: C = None
        self.s: E = None
        self.x: G = None
        self.q: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: J = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: I = None
        self.x: B = None
        self.q: H = None
        self.u: E = None
        self.y: H = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: G = None
        self.q: F = None
        self.x: A = None
        self.y: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: A = None
        self.u: F = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: E = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: H = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.t: H = None
        self.z: J = None
        self.r: E = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: B = None
        self.w: I = None
        self.x: B = None
        self.q: H = None
        self.u: E = None
        self.y: H = None
        self.t: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.p: I = None
        self.v: G = None
        self.q: F = None
        self.x: A = None
        self.y: H = None
        self.u: G = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.w: B = None
        self.p: I = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.p: F = None
        self.x: C = None
        self.w: C = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.p: G = None
        self.s: A = None
        self.u: F = None
        self.o: F = None
        self.txt = txt

class I:
    def __init__(self, txt: str):
        self.y: D = None
        self.q: E = None
        self.u: J = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.x: A = None
        self.o: H = None
        self.txt = txt

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

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