class A:
    def __init__(self, txt: str):
        self.w: C = None
        self.x: J = None
        self.r: E = None
        self.txt = txt

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: I = None
        self.z: I = None
        self.x: D = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: D = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: E = None
        self.s: A = None
        self.v: B = None
        self.t: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.w: E = None
        self.s: G = None
        self.y: A = None
        self.u: G = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: G = None
        self.txt = txt

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

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

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

class C:
    def __init__(self, txt: str):
        self.q: G = None
        self.u: I = None
        self.z: I = None
        self.x: D = None
        self.p: I = None
        self.txt = txt

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

class E:
    def __init__(self, txt: str):
        self.r: I = None
        self.t: D = None
        self.p: I = None
        self.txt = txt

class F:
    def __init__(self, txt: str):
        self.r: G = None
        self.o: E = None
        self.s: A = None
        self.v: B = None
        self.t: I = None
        self.txt = txt

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

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

class I:
    def __init__(self, txt: str):
        self.x: A = None
        self.z: E = None
        self.w: E = None
        self.s: G = None
        self.y: A = None
        self.u: G = None
        self.p: C = None
        self.txt = txt

class J:
    def __init__(self, txt: str):
        self.p: F = None
        self.v: G = None
        self.txt = txt

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

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