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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: E = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: E = None
        self.u: G = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.v: A = None
        self.r: B = None
        self.w: A = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.p: A = None
        self.r: A = None
        self.q: B = None
        self.t: J = None
        self.u: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.y: D = None
        self.s: I = None
        self.w: B = None
        self.z: C = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.z: H = None
        self.q: E = None
        self.y: A = None
        self.s: A = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.p: H = None
        self.q: E = None
        self.u: G = None
        self.r: E = None
        self.o: B = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.t: D = None
        self.s: A = None
        self.v: A = None
        self.r: B = None
        self.w: A = None
        self.q: I = None
        self.txt = txt

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

class G:
    def __init__(self, txt: str):
        self.y: A = None
        self.v: H = None
        self.p: A = None
        self.r: A = None
        self.q: B = None
        self.t: J = None
        self.u: J = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.q: C = None
        self.p: C = None
        self.y: D = None
        self.s: I = None
        self.w: B = None
        self.z: C = None
        self.txt = txt

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

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