class A:
    def __init__(self, txt: str):
        self.x: C = None
        self.o: C = None
        self.w: B = None
        self.z: D = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: I = None
        self.w: G = None
        self.p: I = None
        self.y: A = None
        self.s: C = None
        self.u: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.x: E = None
        self.t: B = None
        self.z: B = None
        self.o: E = None
        self.y: D = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.r: E = None
        self.u: B = None
        self.txt = txt

class D:
    def __init__(self, txt: str):
        self.x: G = None
        self.s: G = None
        self.txt = txt

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

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

class G:
    def __init__(self, txt: str):
        self.w: J = None
        self.z: A = None
        self.txt = txt

class H:
    def __init__(self, txt: str):
        self.v: B = None
        self.o: I = None
        self.w: G = None
        self.p: I = None
        self.y: A = None
        self.s: C = None
        self.u: E = None
        self.txt = txt

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

class J:
    def __init__(self, txt: str):
        self.s: F = None
        self.v: F = None
        self.x: E = None
        self.t: B = None
        self.z: B = None
        self.o: E = None
        self.y: D = None
        self.txt = txt

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

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