class A:
    def __init__(self, txt: str):
        self.o: D = None
        self.p: D = None
        self.r: D = None
        self.s: I = None
        self.q: E = None
        self.y: J = None
        self.v: I = None
        self.z: J = None
        self.w: H = None
        self.u: I = None
        self.txt = txt

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: I = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.r: F = None
        self.o: I = None
        self.w: A = None
        self.u: C = None
        self.q: C = None
        self.t: A = None
        self.x: J = None
        self.txt = txt

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

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

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

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

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

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

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

class B:
    def __init__(self, txt: str):
        self.s: E = None
        self.u: I = None
        self.y: H = None
        self.txt = txt

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

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

class E:
    def __init__(self, txt: str):
        self.z: G = None
        self.v: H = None
        self.r: F = None
        self.o: I = None
        self.w: A = None
        self.u: C = None
        self.q: C = None
        self.t: A = None
        self.x: J = None
        self.txt = txt

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

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

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

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

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

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

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