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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.p: H = None
        self.v: C = None
        self.t: H = None
        self.w: J = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: E = None
        self.r: C = None
        self.u: C = None
        self.v: G = None
        self.w: B = None
        self.x: E = None
        self.q: A = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.o: I = None
        self.txt = txt

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

class D:
    def __init__(self, txt: str):
        self.z: H = None
        self.t: E = None
        self.x: G = None
        self.txt = txt

class E:
    def __init__(self, txt: str):
        self.y: D = None
        self.s: G = None
        self.p: H = None
        self.v: C = None
        self.t: H = None
        self.w: J = None
        self.x: F = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.z: C = None
        self.r: D = None
        self.txt = txt

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

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

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

class J:
    def __init__(self, txt: str):
        self.s: G = None
        self.p: E = None
        self.r: C = None
        self.u: C = None
        self.v: G = None
        self.w: B = None
        self.x: E = None
        self.q: A = None
        self.txt = txt

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

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