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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: D = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.x: F = None
        self.r: G = None
        self.o: F = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: I = None
        self.y: I = None
        self.z: G = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.t: E = None
        self.v: E = None
        self.w: E = None
        self.o: A = None
        self.y: A = None
        self.x: I = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.y: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: H = None
        self.t: E = None
        self.u: B = None
        self.txt = txt

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

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

class B:
    def __init__(self, txt: str):
        self.p: D = None
        self.o: D = None
        self.v: E = None
        self.z: E = None
        self.txt = txt

class C:
    def __init__(self, txt: str):
        self.v: A = None
        self.s: F = None
        self.x: F = None
        self.r: G = None
        self.o: F = None
        self.y: G = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.t: A = None
        self.w: I = None
        self.y: I = None
        self.z: G = None
        self.r: H = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.s: G = None
        self.z: G = None
        self.t: E = None
        self.v: E = None
        self.w: E = None
        self.o: A = None
        self.y: A = None
        self.x: I = None
        self.u: D = None
        self.txt = txt

class G:
    def __init__(self, txt: str):
        self.q: E = None
        self.z: I = None
        self.y: A = None
        self.txt = txt

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

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

class J:
    def __init__(self, txt: str):
        self.v: B = None
        self.p: H = None
        self.t: E = None
        self.u: B = None
        self.txt = txt

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

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